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

drag between grids when one is empty

2 Answers 134 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Venelin
Top achievements
Rank 1
Venelin asked on 09 Jan 2017, 08:00 AM

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 Answers, 1 is accepted

Sort by
0
Eduardo Serra
Telerik team
answered on 09 Jan 2017, 04:19 PM
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.
0
Venelin
Top achievements
Rank 1
answered on 10 Jan 2017, 10:45 AM
Thanx, that worked.
Tags
Grid
Asked by
Venelin
Top achievements
Rank 1
Answers by
Eduardo Serra
Telerik team
Venelin
Top achievements
Rank 1
Share this question
or