MVC .Save Event not firing

3 posts, 0 answers
  1. Randy
    Randy avatar
    75 posts
    Member since:
    Jul 2009

    Posted 14 Jun 2017 Link to this post

    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. Randy
    Randy avatar
    75 posts
    Member since:
    Jul 2009

    Posted 14 Jun 2017 in reply to Randy Link to this post

    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.

  3. Georgi
    Admin
    Georgi avatar
    658 posts

    Posted 16 Jun 2017 Link to this post

    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.
Back to Top