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

TreeView Drag & Drop Issues

7 Answers 146 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Vijay
Top achievements
Rank 1
Vijay asked on 31 Aug 2011, 03:09 PM
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

7 Answers, 1 is accepted

Sort by
0
Svett
Telerik team
answered on 02 Sep 2011, 02:18 PM
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 >>

0
Vijay
Top achievements
Rank 1
answered on 05 Sep 2011, 12:18 PM
How to maintain the state of treeview.
To maintain the state  tried
Expand() 
ExpandAll()
Toggle()
selected=true
None of the above thing works.
0
Svett
Telerik team
answered on 08 Sep 2011, 12:00 PM
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 >>

0
erwin
Top achievements
Rank 1
Veteran
Iron
answered on 09 Sep 2011, 01:22 PM
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
0
Svett
Telerik team
answered on 14 Sep 2011, 04:27 PM
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 >>
0
Vijay
Top achievements
Rank 1
answered on 18 Sep 2011, 05:52 AM
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
0
Svett
Telerik team
answered on 21 Sep 2011, 09:16 AM
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 >>

Tags
Treeview
Asked by
Vijay
Top achievements
Rank 1
Answers by
Svett
Telerik team
Vijay
Top achievements
Rank 1
erwin
Top achievements
Rank 1
Veteran
Iron
Share this question
or