Drag and Drop to a TreeView from different type of controls (e.g. Grid or from another TreeView).

1 posts, 0 answers
  1. Alejandro
    Alejandro avatar
    1 posts
    Member since:
    Apr 2013

    Posted 12 Jun 2013 Link to this post

    (the sample application that I wanted to attached is slightly above 2MB  after having removed binaries, etc... can I email it to someone for support?)

    We have a requirement to drag data from multiple sources and drop it to a treeview. To illustrate the problem(s)...  I am including a VS 2012 Sample project that includes a destination treeview on the left side and another treeview and grid on the right side. The treeview on the left is populated from one database and the treeview and grid on the right from another. The goal is to copy (and not "move) data from one database (on the right) to the other (on the left).
    The sample is based on the Northwind database.

    I couldn't find solutions to many many problems so I just rather to provide a clean sample project so hopefully it can be completed (instead of creating multiple different support tickets). Other that some fragments of JavaScript I could not find any functional and practical sample fully implementing a typical drag and drop scenario on an MVC project with Kendo.

    These are the needs which hopefully can be addressed on the provided sample app.:

    1) We want to drag from the source treeview to the destination treeview... How can we configure the source treeview visual indicators so users know that they can "drag" but not "drop"on the (same) source treeview but on the treeview on the left?

    2) How can we identify the parent node (the target) to which data is being dropped? (I tried the target and dropTarget field but got "undefined"). The other problem is that in our real application, for some reason when data is being  dragged from the grid we do not see any target information (all objects are "undefined").

    3) The treeview is very smart and adds the dragged node automatically when dragging from one treeview to the other... However, it is not the case when dragging from the Grid. Can we get some code about how to accomplish this (even better... modify the sample)  so when dragging from the grid instead of a TreeView, the destination treeview behaves exactly the same (e.g. so it displays the same built-in visual effects when hovering between sibling nodes, a parent node or on a node that doesn't allow child nodes, 

    4) Since we had problems retrieving the destination treeview's targetNode, I could not go further and persist the dragged node to the database implementing an Ajax post to a controller action. It would be great to have that part.

    5) The idea is to copy and not move data... How can we prevent Kendo to visually remove automatically the source node from the source treeview once it's been dragged out?

    Basically... if someone can complete the sample so it allows transferring data from one Northwind database to another (using either the treeview or the grid on the right to the one on the left) it would be great

Back to Top