This content has been marked as final. Show 3 replies
For any data component (including the DataGrid), you can get at the data via the 'dataProvider" property. The dataProvider will be some kind of Collection object, depending on what was used to populate the grid (array, XML, etc.). For instance, if an array was used to populate the grid, then the dataProvider will be an ArrayCollection object. Yyou can get the items as a simple array this way:
var items: Array = ArrayCollection(grid.dataProvider).source;
thank you inline,
but this will give me the data from dataprovider. I have a column that has a checkboxes. If I do this, it gives me always true, because the dataprovider column that populates the checkboxes has all trues.
how do I solve this? how do i get the values of checkboxes?
The grid you're using must have an item renderer/edtior since it's displaying a checkbox column. Since this is a converted 1.5 app, it looks like the item editor is not implemented properly for 2.0 and is not writing the data back to the dataprovider when the user toggles a checkbox. Without seeing the code, all I can suggest is setting rendererIsEditor="true" for the column that has the checkbox. This will at least tell Flex to use the checkbox as an item editor. You might want to read the docs on item renderers and editors: