Link to home
Create AccountLog in
Avatar of petersego

asked on

How do I get a xml-named datagrid-column

Im trying to select a value from a specific column in a datagrid. That column is defined in a xml-file
firstColumn=dgXML.@firstColumn; // Column7

When I click an item in the datagrid, I want to select the content of that column.;
but it does not work even though everything works perfectedly, when referring the correct column like this.;
firstColumn has been set as String and is correctly traced just above
trace(firstColumn); // Column7; // undefined

What could be wrong

Avatar of dgofman
Flag of United States of America image

Are you using XmlListCollection how you defined DataGridColumn and dataProvider and why are you selecting by column name ?
Avatar of petersego


I dont know of xmlListCollection - I think that is flex. Im in flash.
I dont think how Ive created the datagrid is important.
Let me rephrase the question.
How do i get the value from the first column of a specific row after clicking that row in the datagrid?
Will be faster for me to help you if you will attach your FLA file as CS4
Ive attached a CS4-file.
The textfield should show the value of the first column, but I can only make it show the object.

Avatar of dgofman
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Two for one;-)
Absolutely perfect.