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

Best way to detect changes in RadGrid in batch edit mode.

3 Answers 981 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sabrina
Top achievements
Rank 2
Sabrina asked on 07 May 2014, 04:44 PM
Hello, 

What is the best way to detect if my RadGrid in batch edit mode has had any of its cells modified and has pending unsaved changes?  I understand how to detect and handle the "batchEdit" command being fired to say the grid is up to date, but I am not sure how to detect on the client that a cell was modified.  This is my first time using a RadGrid so excuse my inexperience but I didn't see this question asked elsewhere.

3 Answers, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 12 May 2014, 11:23 AM
Hi Sabrina,

One way to determine whether a cell in the grid had changed its value is to subscribe to the OnBatchEditCellValueChanged event and raise a flag which value you can later check. Another option is to construct a method which to check for changes in the table view using the _extractChangesString method.

JavaScript:
function hasChanges() {
           var grid = $find('<%=RadGrid1.ClientID%>'),
               batchManager = grid.get_batchEditingManager();
           return (batchManager._extractChangesString(grid.get_masterTableView()) === "") ? false : true;
       }

By following one of the above suggested approaches you should be able to verify whether the user has edited the data.

Regards,
Angel Petrov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
gaurav
Top achievements
Rank 1
answered on 13 Aug 2019, 02:19 PM

Hi, 

How can the same functionality be achieved in WPF? I tried looking at the WPF forums but unfortunately couldn't find anything that implements the above mentioned functionality. Perhaps, if it exists, can you point me to the right page/thread?

0
Rumen
Telerik team
answered on 13 Aug 2019, 04:23 PM
Hi Gaurav,

Please post your Telerik UI for WPF related questions at the WPF related forums. You can refer the link to this thread too.

Thank you for your understanding. 

Regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Sabrina
Top achievements
Rank 2
Answers by
Angel Petrov
Telerik team
gaurav
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or