drag between grids when one is empty

3 posts, 0 answers
  1. Venelin
    Venelin avatar
    15 posts
    Member since:
    Nov 2016

    Posted 09 Jan 2017 Link to this post

    Hello,

    There is the following issue.

    I cant drag from one grid to another when the second has no data.

    here is the dojo: http://dojo.telerik.com/UZaMU

  2. Eduardo Serra
    Admin
    Eduardo Serra avatar
    119 posts

    Posted 09 Jan 2017 Link to this post

    Hello Venelin,

    This issue is happening because the DropTarget is being set as the table and, when the table is empty, there is no place to drop the row. Setting the DropTarget to the wrapper instead fixes the problem:

    grid1.wrapper.kendoDropTarget({
              drop: function (e) {
                var dataItem = dataSource2.getByUid(e.draggable.currentTarget.data("uid"));
                dataSource2.remove(dataItem);
                dataSource1.add(dataItem);
              },
              group: "gridGroup2",
            });

    Take a look at the updated Kendo UI Dojo here.

    I hope this helps!

    Regards,
    Eduardo Serra
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Venelin
    Venelin avatar
    15 posts
    Member since:
    Nov 2016

    Posted 10 Jan 2017 Link to this post

    Thanx, that worked.
Back to Top