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

Clone Treeview to Templated Treeview

1 Answer 103 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 09 Feb 2011, 03:17 PM
I am trying to use treeviews to give users the ability to create there own Form "Templates"  I have three treeviews on a page The first is the "Drag TO Treeview" which users drag items from the "Drag FROM Treeview" this is a treeview that is databound from a sqlsource. The Third Treeview is the "PREVIEW" Treeview it is simply cloned from Treeview1, However this treeview is itemtemplated with a label and a Textbox because I need this to look somewhat like a form. My objectives are as follows

1. Bind the label to the text of treeview1 upon the cloning
2. If the item is a PARENT hide the textbox so that only the label is show indicating this is simply a header item.

Can this be done with the clone method?

1 Answer, 1 is accepted

Sort by
0
Nikolay Tsenkov
Telerik team
answered on 14 Feb 2011, 07:09 PM
Hi Robert,

Perhaps a good way to go about that would be:
 - Handle the NodeDrop event of the TreeView that is a drop-target on the server. Add the node to the same tree, clone it and add the clone to the mirror-treeView.
You can use the AjaxManager to update all the TreeViews (they all should be updated), or if easier - place the TreeViews in the same AjaxPanel.

Please, let me know if you this somehow doesn't work for this case or having troubles implementing it! I am happy to help!


Regards,
Nikolay Tsenkov
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
TreeView
Asked by
Robert
Top achievements
Rank 1
Answers by
Nikolay Tsenkov
Telerik team
Share this question
or