Grid Detail Template Not Updating Master Row

2 posts, 0 answers
  1. Dawn
    Dawn avatar
    1 posts
    Member since:
    May 2016

    Posted 05 May 2016 Link to this post

    I have pieced together a grid solution from many samples in this forum and online that has a detail template that will update the master row when a detail field changes, keep the row open and provide the user with 1 main save button that will send all changes for the grid main rows and related detail in one submit.

    This jsfiddle example works perfectly, referencing kendo.all.min.js version 2013.1.1319:

        http://jsfiddle.net/jsd2clark/ttghey3n/

    When I use the same code with a newer release of kendo.all.min.js, it does not work as expected.

    This jsfiddle example does not work, referencing kendo.all.min.js version 2016.2.204.

        http://jsfiddle.net/jsd2clark/5qv8kLgo/

    Can anyone help?

  2. Rosen
    Admin
    Rosen avatar
    3253 posts

    Posted 09 May 2016 Link to this post

    Hi Dawn,

    The difference in the behavior is due to the way change events are propagated in the newer version. To achieve the desired result you could either modify the code to use the data methodinstead the view method, or manually call the parent grid's refresh method in order to force redrawing it. Similar to the following:

    Copy Code
    detailRow.find("#FirstName, #LastName, #Country, #City, #NumberField").bind("change"function(e){   
      if(editableModel.dirty){
        viewCollection.splice(viewCollection.indexOf(originalModel), 1, editableModel);     
        grid.refresh();
      }
    });

    Regards,

    Rosen

    Telerik

     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     

     

Back to Top