![]() |
![]() |
||||||
|
|||||||
| Tags: missing |
![]() |
|
|||
|
I am trying to follow the many tutorials on getting data from a DataGrid cell
and what has me stopped dead in my tracks is this line: [Q]tempValue = mydatagrid.dataProvider.getItemAt(row)[field];[/Q] When I show the available options they are the options for the Object class not ArrayCollection class. I wonder if I am mixing Flash with Flex. If so, how do you grab the value in a DataGrid with Flex? Thanks In Advance. |
| Sponsored Links |
|
|||
|
I found a workaround, but still wondering what was my problem above?
Here is how i am doing it now. [Q]var ac:ArrayCollection = dg.dataProvider as ArrayCollection; Alert.show( ac.getItemAt(rownumber)[field] );[/Q] |
|
|||
|
I wouldn't say it is a workaround, it is the correct way of doing it.
On the documentation it is very clear, dataProvider is typed as Object, so whenever you read this property you will get an Object no matter if it really an array, arraycollection or an xml http://livedocs.adobe.com/flex/201/l.../ListBase.html #dataProvider It is important to be aware of the data types of each property, so you can cast it and use it properly. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise