I would like to dynamically set the editable property for a cells in a
datagrid depending on data in my dataprovider, but I don't see any
easy way to accomplish this with the DataGrid as it is.
Example:
My databinded xml dataprovider structure looks like this:
persons
person
@editableFirstname (attribute)
@editableLastname (attribute)
firstname
lastname
I have looked a bit into the source for the DataGrid and
DataGridColumn. The editable property seems to be static and set for
the entire column (not just a cell) does anyone have any idea of how I
can set a single cell to editable?
Ideally it should be possible to write something like this:
<mx:DataGrid dataprovider="{myDatagrid}"...>
<mx:columns>
<mx:DataGridColumn dataField="firstname"
editable="@editableFirstname">
...
<mx:columns>
</mx:DataGrid>
Where the editableFirstname is dynamically looked up in the
dataprovider the sameway as the datafield is.
Regards
Jacob von Eyben
http://ancientprogramming.blogspot.org