Advanced DataGrid and CheckBoxes.. how to enable/disable dynamically
I have an advanced data grid. I'm using a checkbox as an itemRenderer in one column. I want to be able to enable or disable the ability to edit the check box, based on the user's role which is not known until the login process completes.
If name the column and do a myColumn.enabled = false, the check box can still be check or unchecked by the user. This appears to be some sort of 'it is already rendered' problem or something.
<mx:AdvancedDataGrid dataProvider="{myData}" itemClick="myDG_itemClick(event)" id="adgMyGrid">
<mx:columns>
<mx:AdvancedDataGridColumn width="10" id="adgColumn" editable="false" visible="true" sortable="false" dataField="myData" itemRenderer="mx.controls.CheckBox" />
</mx:columns>
</mx:AdvancedDataGrid>
Using the above, I would assume that the adgColumn should not be editable. But it remains editable, no matter if I try to set it in code or in the declaration. What am doing wrong?
