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

Nested TreeView Drag and Drop

2 Answers 110 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Justin
Top achievements
Rank 1
Justin asked on 25 Aug 2011, 05:31 PM
Hi,

I have a treeview nested inside the item template of another treeview.

I would like to be able to use the preview line default behavior for drop targeting in the inner treeview.

I would like for the top level treeview to pass the previewdragended event down to the nested treeview, but only for certain payload types.

Is there any way this can be done?

Thank you,
Justin

2 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 30 Aug 2011, 01:26 PM
Hi Justin,

 Could you please elaborate more on your scenario so that we could advice you better? Having RadTreeView in the ItemTemplate of another RadTreeView is bad practice that could lead to various problems. Actually, this way you are defining RadTreeView in RadTreeViewItem. Isn't it possible to just use one RadtreeView with different templates for the different HierarChical levels if needed ? Probably, the behavior that you want could be achieved with custom D'N'D events of the RadDragAndDropManager but it could cost a lot of code.
Thank you for your cooperation.

Kind regards,
Petar Mladenov
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
Justin
Top achievements
Rank 1
answered on 30 Aug 2011, 04:17 PM
Thank you Petar, you are probably right.  The first reason that I nested another treeview inside the treeviewitem was to change the orientation of the itemspanel inside the nested tree to horizontal.  I suppose I could just use a listbox or itemscontrol.

Thank you for your help, I see your point about the code cost, will restructure.
Tags
TreeView
Asked by
Justin
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Justin
Top achievements
Rank 1
Share this question
or