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

Grid Detail Template Not Updating Master Row

1 Answer 252 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dawn
Top achievements
Rank 1
Dawn asked on 05 May 2016, 02:18 PM

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?

1 Answer, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 09 May 2016, 07:45 AM

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!
 

 

Tags
Grid
Asked by
Dawn
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Share this question
or