It is recommended that you query the underlying dataProvider.
by doing mydatagrid.dataProvider.getItemAt(mydatagrid.selectedIndices[0]).colName;

Generically dginstance.dataProvider.getItemAt(selectedIndex).colName;

In case of having only one selection make the selectedIndex as mydatagrid.selectedIndex;

Hope this helps
Harish

On 10/9/06, Hari Kolasani <[EMAIL PROTECTED]> wrote:

Never Mind. I posted it too soon. I just figured a way to do this:

var:selectedRow = mydatagrid.selectedItems[0];

for (var colName:String in selectedRow ) {
var colVal = selectedRow[colName]);
}

Hari Kolasani wrote:
>
>
> Hello,
>
> I have a Dynamic DataGrid (I create DataGrid columns dynamically based
> on the query Results from back-end.).
>
> Once the datagrid is populated and a row is selected , I can get the
> selectedItem as an object and I can see the values of the columns (in
> FLex Builder debugger).
>
> But, is there any to retrieve the column values using a dynamic column
> name.
>
> For e.g something like
>
> var colName:String = "Customer";
>
> "mydatagrid.selectedItem.getColumnValue(colName)"
>
> Insted of ""mydatagrid.selectedItem.Customer"
>
>


__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to