This content has been marked as final. Show 5 replies
No, you cannot do that.
You must work with the dataProvider. This is because the data is not really "in" the cell. The cell just shows the current data it is over.
Only the visible rows actually even have cells and the cell renderers are recycled when you scroll or change the data.
Now, certain events can give you access to the underlying dataProvider item.
What are you trying to do?
Thanks for your reply ntsiii. I'm want to get the data out of the DataGrid cell. I did find that I can get access to the underlying data provider and get the data that way, but as soon as the user clicks on a column heading to re-sort the trid, it gets screwed up because the underlying array doesn't get sorted - only the datagrid does. I thought I had heard that the array gets sorted too, but my test code does not behave that way.
How are you wanting to use the data? How are you deciding which "rows" (items) you want?
How I want to use the data is somewhat irrelevant. The data I want is the string contents of the cell - that which the user is viewing.
I'm pretty sure the DataGrid ordering is in synch with it's dataProvider - as ntsiii said, the DataGrid itself is just as a mask over the dataProvider.
If you have the rowIndex (say, from a ListEvent.ITEM_CLICK event), you can use:
That should give you the bound object at that row, if it's not working like that, can you post some code and MXML so we can play?