[問題] FLEX DATAGRID資料轉成陣列問題
各位大
小妹目前在做FLEX 欄位練習
想將我的DATAGRID(id 名稱為:sf) 抓出轉成陣列
(DATAGRID的資料是為ITEMRENDER拖拉過來的資料)
程式碼如下:
<mx:DataGrid width="100%" height="198"
dragEnabled="true" dragMoveEnabled="true" dropEnabled="true" change="updateTotal(sf.data);" id="sf">
<mx:columns>
<mx:DataGridColumn headerText="食物名稱" dataField="name" />
<mx:DataGridColumn headerText="熱量(卡路里)" dataField="calorie" />
</mx:columns>
</mx:DataGrid>
但現在利用{sf.data.name}都出不來任何東西
→<mx:Label width="70" text="{sf.data.name}" textAlign="right"/>
不過換成text="{sf.selectedItem.name}"內容就會出現
拜託各位幫忙解惑 ORZ
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.140.16.35
→
06/19 19:11, , 1F
06/19 19:11, 1F
→
06/21 16:09, , 2F
06/21 16:09, 2F
推
06/21 16:21, , 3F
06/21 16:21, 3F