When the data comes back, server-side, I need to determine if the user has actually made any changes, and if they have, which rows they have changed. My current method is to get all rows and compare their values to their "SavedOldValues." Is there a simpler, or more important, a more performant way to do this?
6 Answers, 1 is accepted
Here is a demo link that performs a similar functionality though the changes are being tracked on the client.
The global variable is set to true false based on changes in the edit form controls
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/editondblclick/defaultcs.aspx
Give it a try and let me know if this works for you.
Thanks,
Princy
I think this is it: http://www.telerik.com/help/aspnet-ajax/grid-going-into-edit-mode-with-ajax-double-click.html
Seems to work quite well with the new UserAction option (if you're not using Batch editing):
function UserAction(sender, args) {
if (hasChanges &&
!confirm("Any changes will be lost. Are you sure?")) {
args.set_cancel(true);
}
}
I haven't un-set the value yet, but should be ok to run a "RegisterStartupScript" after clicking "Save Changes" button.
I'm glad you've managed to find out about the OnUserAction event and thank you for sharing your approach with our community. For other commands, you can also use the OnCommand event handler provided by RadGrid.
Regards,
Eyup
Telerik
See What's Next in App Development. Register for TelerikNEXT.
Can you provide an update to this link?
It does not seem to work.
Thank you,
Pheath Ram
Hi Pheath,
Here is the updated link to the target article:
Regards,
Vessy
Progress Telerik
Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).