TreeView Drag & Drop Issues

8 posts, 0 answers
  1. Vijay
    Vijay avatar
    22 posts
    Member since:
    Dec 2010

    Posted 31 Aug 2011 Link to this post

    Hi

    How to manualy drag and drop items within same Treeview beacuse moving items needs to check some validation?
    Can multiple items drag in internal treeview (selection by treenode checkbox)?
    How to remove visual root of drag items (Please refer the attach screenshot) and after that not able to drop?


    Thanks 
    Vijay
  2. Svett
    Admin
    Svett avatar
    728 posts

    Posted 02 Sep 2011 Link to this post

    Hi Vijay,

    I am enclosing a sample project that demonstrates how you can achieve the desired behavior in RadTreeView.

    Kind regards,
    Svett
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Vijay
    Vijay avatar
    22 posts
    Member since:
    Dec 2010

    Posted 05 Sep 2011 Link to this post

    How to maintain the state of treeview.
    To maintain the state  tried
    Expand() 
    ExpandAll()
    Toggle()
    selected=true
    None of the above thing works.
  5. Svett
    Admin
    Svett avatar
    728 posts

    Posted 08 Sep 2011 Link to this post

    Hello Vijay,

    I am not sure that I fully understand the issue. We tested these methods and we were not able to observe any issue on our side. Please, could you send us a sample application and share with us more details regarding how you are trying to change the state of the node? All this will help us to understand the issue and provide you with accurate support. Thank you in advance.

    Looking forward to your reply.

    Greetings,
    Svett
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  6. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 09 Sep 2011 Link to this post

    Hello

    I'm also trying to implement drag/drop behavior in a treeview. However, on drop of a node I have to verify that a node can actually be dropped where the user intends. After I have persisted the new state in the database, I guess, I need to reload the tree from the
    datasource and I then need to recreate the the exact state of each node (expanded, selected) (?).
    I already have menu based commands that alter the tree and have partially solved the reload problem by maintaining the state of each node in my own data structure.

    Each node has an app-specific unique ID, so on state changes (expanded changed, selction changed events) I store the affected nodes' states in a dictionary based on my ID. After rebind/reload I have to loop through the nodes and re-apply the states.

    Is that the way to go?



    Regards
    Erwin
  7. Svett
    Admin
    Svett avatar
    728 posts

    Posted 14 Sep 2011 Link to this post

    Hi Erwin,

    Presently, your solution is the best approach. It will be nice if you share with us how you are doing it. It will be a good showcase.

    Regards,
    Svett
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  8. Vijay
    Vijay avatar
    22 posts
    Member since:
    Dec 2010

    Posted 18 Sep 2011 Link to this post

    Hi Svett

    Thanks for the sample project RadTreeViewDragAndDrop-Behavior-Checked.zip. Your quick response is appriciable.
    Refer the attached screenshot. In the treeview I have selected Folder 123 123 and its subfolder. Also I have selected folder 1212 121212 and its subfolders. Now I want to drag & drop those under treefolder 444 4444. Can you help me with some sample project how to do this.

    Thanks in advance.
    Vijay
  9. Svett
    Admin
    Svett avatar
    728 posts

    Posted 21 Sep 2011 Link to this post

    Hello Vijay,

    You can achieve the desired behavior with the supplied project out of the box. I am enclosing a sample video that demonstrates it. Notice that you need web browser and installed Flash plugin to watch the video.

    Best wishes,
    Svett
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
UI for WinForms is Visual Studio 2017 Ready