I have an editable grid and would like to update values based on the edited cell and I am doing this in the itemEditEndHandler such that when they finish editing a cell I update other cells that are dependent on it. the only problem is in the itemEditEndHandler the new value has not registered yet. If I try and get the value of the cell i find that its still giving me the old value and not the new value that I have entered.
What event handler can I use to capture new values that have been changed in a flex datagrid.
255 Views Asked by Linda At
3
There are 3 best solutions below
0
On
Listen for collectionChange event on the dataProvider of the DataGrid.
ListCollectionView objects, i.e. ArrayCollection and XMLListCollection objects, dispatch a CollectionEvent.COLLECTION_CHANGE event whenever there is a change in the collection. Check for the kind property of the dispatched event - if it is CollectionEventKind.UPDATE, it means that one or more items have been updated. The items array of the event will hold the updated items.
If your datagrid is using a dataProvider that is an ArrayCollection, you can call its refresh() method in the handler triggered by the itemEditor's change event, then call the dataGrid's invalidateList() method.