Clone Treeview to Templated Treeview

2 posts, 0 answers
  1. Robert
    Robert avatar
    49 posts
    Member since:
    Sep 2008

    Posted 09 Feb 2011 Link to this post

    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?
  2. Nikolay Tsenkov
    Nikolay Tsenkov avatar
    734 posts

    Posted 14 Feb 2011 Link to this post

    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!

    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.
Back to Top