看板 Flash 關於我們 聯絡資訊
各位大 小妹目前在做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
Kcars:sf.dataProvider沒有嗎? 06/19 19:11
increase01:剛剛試過但還是不行,請問還有其他方法嗎? 06/21 16:09
cjcat2266:請詳述何謂"不行",否則大家只能瞎猜喔 06/21 16:21