开发者

How to transform a String into an object name selectedItem in the DataGrid? flex3

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜