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

RadTreeview node template containing another radtreeview

3 Answers 70 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Safa
Top achievements
Rank 1
Safa asked on 09 Nov 2012, 03:46 PM
Hi Telerik team,

I have a Treeview, and the user can drag & drop items from other controls onto it, and then I create a user control dynamically and add it to the node. Also, the user can move these nodes up and down with drag & drop, and everything works fine so far. One type of user control that is created in this process, contains another treeview. Drag & drop from other controls to this 'child' treeview also works fine, but now this node cannot be be moved up and down, as the drag no longer works for this node.

In summary, when node 'A' in treeview 'tvA' contains in its nodeTemplate, a user control which has another treeview, 'tvB', the drag does not work for node 'A'. Everything is created from code behind. I haven't tested to see if it works when done from markup, but that wouldn't work for me anyway.

Thanks for your help,
Regards,
Safa

3 Answers, 1 is accepted

Sort by
0
Safa
Top achievements
Rank 1
answered on 20 Nov 2012, 08:47 PM
I still have this problem. Can anybody help me, please? 
Thanks.
0
Veysel
Top achievements
Rank 1
answered on 14 Jun 2016, 06:59 PM
Hi Telerik,

I have problem similar Safa's but I do all dragdrop functions on client-side. I have two treeviews. A and B. A has a diffrent nodetemplate, B has diffrent nodetemplate. all templates use same attributes and diffrent design for template content. I see right template nodes on both treeview when I loaded webform.  I draged a node at A to B, I lose nodetemplate at new node. I draged = I added node to target and after deleted at source.

What do I do for rebind/refresh/InstantiateIn??like templatebind? on javascript? 

thanks,

VI
0
Peter Milchev
Telerik team
answered on 17 Jun 2016, 04:08 PM
Hello VI,

To apply a client template to a node, you have to call the bindTemplate() function on that node. Here are the Client Templates Demo and Client Templates documentation article you could use for further reference.

Regards,
Peter Milchev
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
TreeView
Asked by
Safa
Top achievements
Rank 1
Answers by
Safa
Top achievements
Rank 1
Veysel
Top achievements
Rank 1
Peter Milchev
Telerik team
Share this question
or