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

Drop on a Column

1 Answer 34 Views
Drag and Drop
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 02 Apr 2017, 02:54 AM
Here's my situation:
When a user drags a node from a TreeView and drops it in a grid, I add a column.  That works...  When a user drops a node onto an existing column in the grid, I want to ask the user if they'd like to append that same column or insert a new column to the right of that one...  How can I do this?  

I'm struggling to identify the index of the column the user dropped on, etc...  Make the grid a kendoDropTargetArea?  Make each column its own DropTarget?

1 Answer, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 04 Apr 2017, 11:51 AM
Hi Joe,

During the dragend event, you can use the e.toElement to get the actual element that is drop target. Then you need some logic to check if that element is part of the grid, or given column. It would depend further on what is your exact configuration.

Regards,
Vasil
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.
Tags
Drag and Drop
Asked by
Joe
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Share this question
or