This is a migrated thread and some comments may be shown as answers.

Batch mode (inCell edit) - when a value is changed, can you know previous value

6 Answers 865 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Curt Rabon
Top achievements
Rank 1
Veteran
Curt Rabon asked on 01 Feb 2017, 09:11 PM

For batch mode (inCell editing), when a value is changed in a cell, is there an event that can be used where I can know what field changed and what the previous value was?

I asked about this several years ago, so I'm asking now again in 2017 hoping you have an answer.

6 Answers, 1 is accepted

Sort by
0
Curt Rabon
Top achievements
Rank 1
Veteran
answered on 02 Feb 2017, 03:07 PM
I already know about the dataSource change event, which will tell me which field changed and what the new value is, but I need the previous value, without the need for a custom editor.
0
Konstantin Dikov
Telerik team
answered on 03 Feb 2017, 01:53 PM
Hello Curt,

Within the save event of the Grid you can get reference to the new value and the old value. The new value is accessible within the values collection of the event argument and the old value is within the model:
Hope this helps.


Regards,
Konstantin Dikov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Curt Rabon
Top achievements
Rank 1
Veteran
answered on 03 Feb 2017, 04:26 PM
OK, thanks, that works.  I read the documenation for the grid's save event, but because you don't say that the model passed to the event is the old or the updated version (with the new values), I assumed it was already updated when it's passed to the save event.  It would be greatly helpful if you would not assume we know what you mean when we read the documentation for that event.  It would be very helpful if you would update the wording for the e.model to say that this instance of the model data is **BEFORE** the new values have been applied.
0
Curt Rabon
Top achievements
Rank 1
Veteran
answered on 06 Feb 2017, 08:27 PM
Also, where are the properties for the e.values object (like "name") documented?
0
Curt Rabon
Top achievements
Rank 1
Veteran
answered on 06 Feb 2017, 08:32 PM
Disregard my question about the properties of e.values being documented...I see that e.values is an object of all your model properties that changed.
0
Konstantin Dikov
Telerik team
answered on 07 Feb 2017, 12:03 PM
Hello Curt,

Thank you for your feedback regarding the documentation of the "save" event. We will revise it and see if we can make it more clear.
 

Best Regards,
Konstantin Dikov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Curt Rabon
Top achievements
Rank 1
Veteran
Answers by
Curt Rabon
Top achievements
Rank 1
Veteran
Konstantin Dikov
Telerik team
Share this question
or