取得組件在父容器中的索引

爲DataGrid提供一個ComboBox類型的ItemRenderer,以下圖:ide

可是在點擊ComboBox的時候取不到DataGrid當前的selectedIndex,不能實現須要的功能。spa

利用下面代碼可取得當前項在DataGrid的dataProvider中的索引。xml

 

  
  
  
  
  1. var itemIndex:int = ArrayCollection((owner as DataGrid).dataProvider).getItemIndex(_ownerData); 
相關文章
相關標籤/搜索