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

5 posts, 1 answers
  1. Brian D
    Brian D avatar
    9 posts
    Member since:
    Jan 2007

    Posted 26 Aug Link to this post

    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.
  2. Answer
    Stefan
    Admin
    Stefan avatar
    272 posts

    Posted 30 Aug Link to this post

    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.
     
  3. Kendo UI is VS 2017 Ready
  4. Brian D
    Brian D avatar
    9 posts
    Member since:
    Jan 2007

    Posted 30 Aug in reply to Stefan Link to this post

    Thank you so much — this looks like it will suit my needs perfectly!
  5. Brian D
    Brian D avatar
    9 posts
    Member since:
    Jan 2007

    Posted 30 Aug in reply to Stefan Link to this post

    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. 
  6. Brian D
    Brian D avatar
    9 posts
    Member since:
    Jan 2007

    Posted 30 Aug in reply to Stefan Link to this post

    I should have checked the console first .. looks like the line that is loading the kendo js library got messed up a little.
Back to Top
Kendo UI is VS 2017 Ready