Get Id of Grid row dragged and dropped onto Treeview

5 posts, 1 answers
  1. Victor
    Victor avatar
    167 posts
    Member since:
    Nov 2010

    Posted 11 Jul 2012 Link to this post

    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
  2. Answer
    Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2284 posts

    Posted 12 Jul 2012 Link to this post

    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!
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Victor
    Victor avatar
    167 posts
    Member since:
    Nov 2010

    Posted 12 Jul 2012 Link to this post

    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
  5. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2284 posts

    Posted 13 Jul 2012 Link to this post

    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!
  6. Victor
    Victor avatar
    167 posts
    Member since:
    Nov 2010

    Posted 13 Jul 2012 Link to this post

    Ok, sounds nice.

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

    /Victor
Back to Top
UI for ASP.NET MVC is VS 2017 Ready