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

爲DataGrid提供一個ComboBox類型的ItemRenderer,如下圖: 但是在點擊ComboBox的時候取不到DataGrid當前的selectedIndex,不能實現需要的功能。 利用下面代碼可取得當前項在DataGrid的