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

Reorder Rows in Nested Grid - Using KendoSortable

2 Answers 169 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nariman
Top achievements
Rank 1
Nariman asked on 06 Jul 2016, 08:30 PM

Hi,

I refer to the following how to demo: http://docs.telerik.com/kendo-ui/controls/interactivity/sortable/how-to/reorder-nested-grid-rows

There is bug in this demo. If any of the master grid row is not expanded yet, dragging that row results in dragging 2 rows!But if the row previously expanded then it works fine!

You can reproduce this bug in the above demo by trying to collapse the first row, then without expanding the 3rd row try to drag it then you can see the 3rd & 4th rows drag together as of they are attached. But if you expand the 3rd row and collapse it again then you can drag it individually!

I believe the problem is in this line: table.append(element.next().clone()); there should be some if condition here to check if the detail-row for this master row exist then do this otherwise don't close the next element.

Please let me know what is the best way to resolve this problem?

Thank you.

 

2 Answers, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 08 Jul 2016, 02:09 PM

Hello Nariman,

Indeed there is no need to append the next element to the hint. Please refer to the http://dojo.telerik.com/omeFi example, which should work fine now. 

Thank you for your feedback. We will update the documentation as soon as possible. 

Regards,
Boyan Dimitrov
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Nariman
Top achievements
Rank 1
answered on 11 Jul 2016, 07:29 PM

Thanks Boyan,

In fact, the original code is nice, you just need to wrap it in the "if statement"...something like this:

              if (element.next('.k-detail-row').length>0){
                   table.append(element.next().clone());
              }

Tags
Grid
Asked by
Nariman
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Nariman
Top achievements
Rank 1
Share this question
or