Commit the new value of the itemEditor element before the itemEditEnd event

I have a DataGrid, with itemEditoras NumericStepperin multiple columns. When the value in the DataGrid is edited, I would like to update several values ​​displayed on the screen, and therefore I want to call the function updateValues().

At first I added this function to the itemEditEndevent DataGrid, but the function gets called before the new value is updated in dataProvider, and therefore the values ​​that I have in the function are old values. Is there another event that fires after updating values ​​in dataProvider? or am I missing something?

Secondly, I tried to put this function in the change event of each itemEditor(duh!), But again, the change event is fired, but the values ​​in dataProviderare old.

Is it possible to call a function updateValues()every time a value is edited and updated in dataProvider, because where do I get the values ​​from?

Many thanks.

+5
source share
1 answer

"In your event listener, you can view the data entered in the item editor. If the data is incorrect, you can call the preventDefault () method to stop Flex from transferring new data back to the list-based control and from closing the editor." ( source )

, , , .

: Datagrid Edit. . - . Flex. .

+6

All Articles