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

[Drag and Drop] Getting ID of GridDataItem dropped on

1 Answer 40 Views
Grid
This is a migrated thread and some comments may be shown as answers.
EpiqDev
Top achievements
Rank 2
EpiqDev asked on 17 Oct 2008, 12:52 AM
Hi,

I have a tricky one . . .

My specific requirement is to drag a TreeNode from a RadTreeView to a GridDataItem in a RadGrid and have it populate into the DetailsTableView of the specific GridDataItem the TreeNode was dragged onto.

I already have the solution for dragging a TreeNode into a RadGrid implemented and tested, it works fine.

My only problem I now face is getting the ID of the GridDataItem the user dragged the TreeNode onto. I know it involves some javascript magic and probably a hidden field to store the ID for the server.

Please help me out Telerik Forum, you are my only hope! Any links or resources you can point me at to would be much appreciated.

1 Answer, 1 is accepted

Sort by
0
EpiqDev
Top achievements
Rank 2
answered on 17 Oct 2008, 05:10 AM
I may have found something I can use in this  KB Article

Particularly these lines of code in the function RowCreated(row) of dragdrop.js:

... 
var target = e.srcElement || e.target; 
var destinationRowIndex = target.parentNode.rowIndex - 1; // insert before 
... 

If I'm on the wrong track, someone please let me know . . .
Tags
Grid
Asked by
EpiqDev
Top achievements
Rank 2
Answers by
EpiqDev
Top achievements
Rank 2
Share this question
or