RadTreeView Drag&Drop SP2

3 posts, 0 answers
  1. BrzozAle
    BrzozAle avatar
    9 posts
    Member since:
    May 2007

    Posted 01 Aug 2007 Link to this post

    Hi
    I have Q1SP2.
    I`ve read, that Drag and Drop is possible only betweens TreeNodes (http://www.telerik.com/community/forums/thread/b311D-mchta.aspx)
    Few suggesions:
    1. I have two DockPanels - in each of them is RadTreeView. When I try drag node from first tree to second (or sometimes when I change position of node in the same tree) I get "NullReferenceException". (My Trees are indentical like in Your example, but they are in DockPanels). So meybee You`ll find a solution i next version, it would be helpful :-)
    2. I`ve seen that when I drag node from one tree to another,in fact I cut node from first tree and add to second. There are situations when we want copy node - not cut. Meybee is some property which coresponding with this, I don`t know.
    3. It would be helpful, when there would be a possibility block changing position of nodes in this way, that for example, I move parent node and I add to another, but as a child. For example: I have tree of devices:
    Modem -- > Parent Node
      Sagem
      Philips
    KEYBOARD ---> Parent Node
      4-Tech
      Logitech
    So, I should have possibility change position of Node "Keyboard" (with all childs) for example before Node "MODEM":
    KEYBOARD
      4-Tech
      Logitech
    Modem
      Sagem
      Philips
     but I shouldn`t change position of Node "Keyboard" in way, as below:
    Modem
      Sagem
      Philips
    4- Tech <----- now this is Parent Mode but it shouldn`t be
      MODEM <---- old Parent Node, which now is child but it shouldn`t be
      Logitech

    Of course there are only my suggestions, I`ll try resolve this myself.But when You give us something like "AllowDragAndDrop", "AllowDragDropBetweenTreeViews" etc You could think about this :-)

    Best regards
    Aleksander



  2. BrzozAle
    BrzozAle avatar
    9 posts
    Member since:
    May 2007

    Posted 01 Aug 2007 Link to this post

    Fortunetly, "standard " drag and drop work, so I can resolve this my self :-) Even when RadTreeViews are in Dock Panels :-)
    BK

    Aleksander
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 01 Aug 2007 Link to this post

    Hi Aleksander,
    Following are the answers of your questions in the same order:

    1. We tried reproducing the issue that you describe but to no avail.
      It would be best if you could send us a sample project demonstrating the problem, so we can test
      with your exact scenario.
      However, it should be noted that fixes were made for the Drag and Drop functionality of RadTreeView since SP2, meaning that the issue at hand may be fixed already.
    2. You could implement copy behavior on drag and drop as custom logic (for example by handling the DragEnding event of RadTreeView). It will not be easy to implement such behavior in RadtReeView itself as there are many scenarios where such behavior is dangerous/unwanted.
    3. There are two choices if you want to interrupt a drag and drop operation
      1. setting the AllowDrop property of a RadTreeNode to false to forbid dropping on it.
      2. handling the DragEnding event of RadTreeView and implementing more complex logic that basing on the dragged node and the target node sets the Cancel property of the event arguments to true.

    Hope that helps.

    If you have any other suggestion regarding RadControls for WinForms we will be glad if you share them with us.
    Thank you for you cooperation.

    Kind regards,

    Jordan

    the Telerik team


    Instantly find answers to your questions at the new Telerik Support Center
Back to Top