如果自己的行編輯有級聯更新,就是說用上了
dtableGrid.dataProvider[rowIndex] = resultData;
dtableGrid.dataProvider.itemUpdated(dtableGrid.dataProvider[rowIndex]);
itemUpdated 這個方法。 這個是手動更新數據。
這個時候爲了防止出現行編輯事件結束後,出現數據修改不對應的問題。
就需要在行編輯 end 方法裏面最後一行加上
(dtableGrid.dataProvider as ArrayCollection).disableAutoUpdate();
就是不讓datagrid 自己更新數據。
然後在自己手動更新前加上
dtableGrid.dataProvider as ArrayCollection).enableAutoUpdate();
不加的話,會無法更新數據。