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

MVC .Save Event not firing

2 Answers 732 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Randy
Top achievements
Rank 1
Randy asked on 14 Jun 2017, 12:04 PM

I have an MVC grid where I have a Save event defined as follows:

.Events(events => events.Change("gridRowChange").Edit("onEdit").Save("onSave"))

In my JavaScript code I have an onSave(e) function defined that never gets called when a grid item is saved.

I should also point out that all grid rows in this page are saved manually via a JS function containing the following line.

    $("#grid").data("kendoGrid").saveRow();

I saw in another thread from several years ago that someone else was having the same issue doing what I'm doing but I never saw a resolution.

2 Answers, 1 is accepted

Sort by
0
Randy
Top achievements
Rank 1
answered on 14 Jun 2017, 03:34 PM

I posting this again because I've learned a bit more about what's happening. So here is my new post / question:

I have an MVC grid where I have a Save event defined as follows:

.Events(events => events.Change("gridRowChange").Edit("onEdit").Save("onSave"))

In my JavaScript code I have an onSave(e) function defined that never gets called when a grid item is saved programmatically as follows:

$("#grid").data("kendoGrid").saveRow();

However, if a row is not saved programmatically, or, in other words, when the grid itself saves the row, my Save event does get called.

0
Georgi
Telerik team
answered on 16 Jun 2017, 03:57 PM
Hello Randy,

I tried to reproduce your issue but saveRow works as expected on my end. Have in mind that if there are no changes over the data, the Kendo Grid wont execute any requests to the server and respectively wont fire the save event.

Please make sure that you have non updated data before executing saveRow method. 

If the issue persists even if non updated data is available, please send us runnable isolated sample via support ticket where the issue occurs, so we can investigate locally your exact case and help you more efficiently.

Regards,
Georgi
Progress Telerik
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
Randy
Top achievements
Rank 1
Answers by
Randy
Top achievements
Rank 1
Georgi
Telerik team
Share this question
or