我一直在使用一个DataGrid有两列做到了,并且这种方法工作得很好,我:
<mx:columns>
<mx:DataGridColumn dataField="parameter" width="110" resizable="false">
<mx:itemRenderer>
<mx:Component>
<mx:Label truncateToFit="true" fontWeight="bold" />
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
<mx:DataGridColumn dataField="value">
<mx:itemRenderer>
<mx:Component>
<mx:HBox width="100%" height="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off"
currentState="{(data.parameterType) == 'bool' ? 'checkboxState' : 'baseState'}">
<mx:states>
<mx:State name="baseState">
<mx:AddChild>
<mx:Label truncateToFit="true" text="{data.value}" paddingLeft="2" />
</mx:AddChild>
</mx:State>
<mx:State name="chbState">
<mx:AddChild>
<mx:CheckBox selected="{data.value && parseInt(data.value)}" paddingLeft="5" />
</mx:AddChild>
</mx:State>
</mx:states>
</mx:HBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
列表或数据网格?另外,如何制作类别?我不明白这是List控件的标准行为。 – pbean 2010-11-03 19:15:43
列表。如果你看一下Alex Harui过去所做的一些事情,我认为它是可行的。它真的只是一个不同的项目渲染器。 – 2010-11-04 07:54:08