AdvancedDataGrid ItemRenderer Ignored w/HierarchicalData
I am using an AdvancedDataGrid with some hierarchical data. In the first column, I want to indicate whether or not the "name" field is editable by graying out the text for the "name" property of my objects. It's very odd, but when I set the AdvancedDataGridColumn's dataField property to "name", and have it in the first column, it seems to completely ignore my inline ItemRenderer. If I change the dataField property to something else, or change the column ordering so the Name column isn't first, everything suddenly works.
Any help with this issue would be greatly appreciated. Let me know if any more code would help, but here is the simple ItemRenderer I'm trying to use in the first column:
<mx:AdvancedDataGridColumn dataField="name" headerText="Name" width="150" editable="true" sortable="false">
<mx:itemRenderer>
<fx:Component>
<m开发者_运维百科x:Label color="{data.nameIsEditable ? 0x000000 : 0xCCCCCC}" />
</fx:Component>
</mx:itemRenderer>
</mx:AdvancedDataGridColumn>
My guess is that it has something to do with the way the indentation or icons can be set for the first column with hierarchical data, but I really have no clue. Thanks in advance.
You need to set the groupItemRenderer
which is used to render the treeColumn
(the column that displays the icons, which per default is the first column).
精彩评论