[英]How to find the index of a dropped item in flex
如何使用火花列表找到放入 flex 列表中的項目的索引?
Hiii 我是 Anil Mhetre,這是查找 S:data grid 的刪除索引的解決方案 解決方案:- 將事件偵聽器添加到我們要在其上查找刪除索引的數據網格,例如
id_DG_TestCond.addEventListener(GridEvent.GRID_MOUSE_UP,
getgridselectedIndex);
here id_DG_TestCond is the id of datagrid & getgridselectedIndex is the event handler for GridEvent.GRID_MOUSE_UP.Event handler, for the same given below:
protected function getgridselectedIndex(event:GridEvent):void
{
var droppingIndex = event.currentTarget.grid.hoverRowIndex;
}
在dragComplete事件偵聽器中,您可以執行以下操作:
var indexOfDroppedItem : int = list.dataProvider.getItemIndex(event.dragSource );
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.