I need to get the value of the item clicked and the name of the columns.
for each(item in colunas) {
var itemok:String = item.dataField;
Alert.show(''+datagridlist.selectedItem.itemok); // show value of column
}
But this way it returns 'undefined'.
But if I put the name already in function, I can get the correct data, example:
Alert.show(''+datagridlist.selectedItem.create); // create is a column name in mysql
But this variable must be created dynamically, example:
var itemok:String = item.dataField;
Alert.show(''+datagridlist.selectedItem.itemok); // show value of column
Could s开发者_运维问答omeone help me? I'm at it on time and I can not convert the string to column name.
I thank you all now
Does your "selectedItem" Object contains a "create" property, or it is just the name of the table row?
question already resolved
see as it was
Alert.show (''+ datagridlist.selectedItem [itemok]);
Thanks anyway to all and sorry for the two topics.
精彩评论