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

Master/Detail strange behaviour

2 Answers 67 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mattia
Top achievements
Rank 1
Mattia asked on 09 Mar 2016, 04:35 PM

Hello! I'm developing a master/detail with two kendo grids, as you can see in this kendo dojo: http://dojo.telerik.com/EREHO/20

When you click on a row on top master grid, in the bottom detail grid appears the selected row "projected" in different way.

You can edit the fields in detail grid and this will affect also the master grid.

But there is an unexpected behaviour: looking at bottom field (InsertionDate) in detail grid, when you edit another field the name "InsertionDate" is replaced by the name of edited field, and also the red dirty corner is applyed always at bottom field.

After some debugging I have managed to understand the something goes wrong inside function that handles 'save' event in detail grid, in particullary in these code lines:

row.set(prop, value);
var selectedRow = $('#masterGrid').find("tbody>tr[data-uid=" + ctrl.selectedRowUid + "]");
$grid.select(selectedRow);

Is this some kind of kendo bug or am I achieving this behaviour in a wrong way? Do you have any suggestion for this issue?
Thanks!

Mattia Thiella

 

2 Answers, 1 is accepted

Sort by
0
Mattia
Top achievements
Rank 1
answered on 10 Mar 2016, 10:26 AM

Ok I have resolved using a little different approach: I use editCell method to set the field editable, and then I set the value.

Here you can check the demo if someone is interessed : demo

Goodbye!

0
Kiril Nikolov
Telerik team
answered on 11 Mar 2016, 09:03 AM
Hello Mattia,

Thanks for sharing your solution.

As a small gesture of gratitude I have updated your Telerik Points balance.

Regards,
Kiril Nikolov
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
Mattia
Top achievements
Rank 1
Answers by
Mattia
Top achievements
Rank 1
Kiril Nikolov
Telerik team
Share this question
or