views:

50

answers:

2

Hello Friends, 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 someone help me? I'm at it on time and I can not convert the string to column name.

I thank you all now

A: 

Hi!

Does your "selectedItem" Object contains a "create" property, or it is just the name of the table row?

Adrian Pirvulescu
A: 

Hi friend, question already resolved

see as it was

Alert.show (''+ datagridlist.selectedItem [itemok]);

Thanks anyway to all and sorry for the two topics.

luiz henrique