I get it!!
This code traverse the selected row of a DataGrid, get the dataField
of each column and its value.
var fieldname:String = new String();
for( var i:Number=0; i<mydatagrid.columns.length; i++ ){
fieldname = mydatagrid.columns[i].dataField;
Alert.show( mydatagrid.dataProvider[mydatagrid.selectedIndices][
fieldname ] );
}
(Thanks to Felix)
--- In [email protected], "ddanone2" <[EMAIL PROTECTED]> wrote:
>
> I fill the DataProvider of a DataGrid with an array, when the user
> selects a row i retrieve the selected row with selectedItem property.
>
> I want to get the value of each column not acessing by the dataField
> but acessing by an index, is that possible ?
>
> Thanks in advance
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/