-1
我需要在關閉彈出窗口後保留該列的選擇。 我在其他視圖中使用了此解決方案(發佈在此鏈接中: Keep selection when refreshing datagrid in ActionScript),當我保持相同視圖時,它工作得很好,但是當我打開彈出窗口並返回時,它不起作用。 你能幫我嗎? 預先感謝您。關閉彈出窗口後繼續選擇
我需要在關閉彈出窗口後保留該列的選擇。 我在其他視圖中使用了此解決方案(發佈在此鏈接中: Keep selection when refreshing datagrid in ActionScript),當我保持相同視圖時,它工作得很好,但是當我打開彈出窗口並返回時,它不起作用。 你能幫我嗎? 預先感謝您。關閉彈出窗口後繼續選擇
您可以將selectedIndex存儲在全局變量中。然後打開彈出窗口並返回後,您將能夠設置selectedIndex。
例:
FlexGlobals.topLevelApplication.selectedIndexOfDataGrid = dataGrid.selectedIndex;
... opening pupup ... etc...
dataGrid.selectedIndex = FlexGlobals.topLevelApplication.selectedIndexOfDataGrid;
凡selectedIndexOfDataGrid是你的主要的.mxml文件中的公共變量。
public var selectedIndexOfDataGrid:Number;
嗨伊萬。非常感謝你。我會使用你的解決方案然後回來告訴它發生了什麼。 – user3375947
你可以發佈查詢,然後在同一個討論頁面? – prabindh