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

How to drag-and-drop between grids to an empty grid?

4 Answers 593 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brian D
Top achievements
Rank 2
Brian D asked on 26 Aug 2016, 10:13 PM
I implemented drag-and-drop between grids without any problems, but how do you drop into a grid when it is empty? The problem can be reproduced on your demo at http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/drag-and-drop-rows-between-two-grids by dragging/dropping each of the rows in one grid to the other grid until all the rows have been moved to the other grid. If you then try to drag/drop a row back to the original (now empty) grid, it won't let you drop into the empty grid.

4 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 30 Aug 2016, 12:05 PM
Hello Brian,

The issue occurs because the DropTarget is initialized over the Grid' table. When there are no items, the Grid' table is empty, and there is no place where the new row can be dropped.

I can suggest using the wrapper element, instead of the table element. I modified the provided example to demonstrate this implementation:

http://dojo.telerik.com/ugeTe

I hope this is helpful.

Regards,
Stefan
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Brian D
Top achievements
Rank 2
answered on 30 Aug 2016, 01:41 PM
Thank you so much — this looks like it will suit my needs perfectly!
0
Brian D
Top achievements
Rank 2
answered on 30 Aug 2016, 03:16 PM
I had to do something between my last reply and just now when I went to grab the code, and the demo no longer works ... it's just a blank screen when I run it. 
0
Brian D
Top achievements
Rank 2
answered on 30 Aug 2016, 03:27 PM
I should have checked the console first .. looks like the line that is loading the kendo js library got messed up a little.
Tags
Grid
Asked by
Brian D
Top achievements
Rank 2
Answers by
Stefan
Telerik team
Brian D
Top achievements
Rank 2
Share this question
or