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

Get Id of Grid row dragged and dropped onto Treeview

4 Answers 171 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Victor
Top achievements
Rank 1
Victor asked on 11 Jul 2012, 08:03 PM
Hi!

I have been trying to drag and drop a grid row onto a treeview item. It works reasonably well, but I dont see how I can get the ID of the grid row the drag originates from. Hopefully you can! Attached is an example triggering an alert box where I want to get the ID.

Thanks in advance!
/Victor

4 Answers, 1 is accepted

Sort by
0
Accepted
Nikolay Rusev
Telerik team
answered on 12 Jul 2012, 07:58 AM
Hello Victor,

You need to change the script in the view as in the attached project.

Greetings,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Victor
Top achievements
Rank 1
answered on 12 Jul 2012, 11:23 AM
Hi again,
Thanks for that working example! However I must ask, shouldnt "e" (the argument to the drop function) contain a reference to the element the drag originated from?

/Victor
0
Nikolay Rusev
Telerik team
answered on 13 Jul 2012, 10:34 AM
Hello Victor,

DropTarget drop event actually have reference to the draggable element in the arguments:
http://docs.kendoui.com/api/web/droptarget#drop

All the best,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Victor
Top achievements
Rank 1
answered on 13 Jul 2012, 11:11 AM
Ok, sounds nice.

Nice to have a way that works in the meantime anyway!

/Victor
Tags
General Discussions
Asked by
Victor
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Victor
Top achievements
Rank 1
Share this question
or