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.@firstCo lumn; // Column7
When I click an item in the datagrid, I want to select the content of that column.
e.target.selectedItem.firs tColumn;
but it does not work even though everything works perfectedly, when referring the correct column like this.
e.target.selectedItem.Colu mn7;
firstColumn has been set as String and is correctly traced just above
trace(firstColumn); // Column7
e.target.selectedItem.firs tColumn; // undefined
What could be wrong
firstColumn=dgXML.@firstCo
When I click an item in the datagrid, I want to select the content of that column.
e.target.selectedItem.firs
but it does not work even though everything works perfectedly, when referring the correct column like this.
e.target.selectedItem.Colu
firstColumn has been set as String and is correctly traced just above
trace(firstColumn); // Column7
e.target.selectedItem.firs
What could be wrong
Are you using XmlListCollection how you defined DataGridColumn and dataProvider and why are you selecting by column name ?
ASKER
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?
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
ASKER
Ive attached a CS4-file.
The textfield should show the value of the first column, but I can only make it show the object.
getdgvalue.fla
The textfield should show the value of the first column, but I can only make it show the object.
getdgvalue.fla
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Two for one;-)
Thanks.
Absolutely perfect.
Thanks.
Absolutely perfect.