drag and drop treeview items into a div container

4 posts, 0 answers
  1. Rohan
    Rohan avatar
    13 posts
    Member since:
    Nov 2010

    Posted 03 Dec 2010 Link to this post


    I am using a RadTreeView. I saw the example regarding the dragging and dropping of treeview items in RadGrid. I want to drag the items from RadTreeView and drop it into a div.

    Please assist me on this.

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 03 Dec 2010 Link to this post

    Hello Rohan,

    In the demo it shows how to drop node in TextBox control ans setting the text value from client side (in dropOnHtmlElement method in demo). I hope this would shed some light on accomplishing your requirement.
    TreeView / Drag-and-drop

  3. Rohan
    Rohan avatar
    13 posts
    Member since:
    Nov 2010

    Posted 05 Dec 2010 Link to this post

    Hi Shinu,

    Thanks for your reply. Its done but another problem raised. When I drag and drop asp.net controls it works fine, but when I drop telerik controls it stops working. It gives following error: "Script controls may not be registered after PreRender."

    Every item in the TreeView is basically a control like textbox, datepicker, dropdownlist etc. When I continue dropping  textboxes it works fine but as soon as I drop telerik datepicker and then any other other control it gives the above error.

    I tried with OnInit, PreRender, OnLoad events but of no use. The error remains the same.

    Please assist me...

  4. Nikolay Tsenkov
    Nikolay Tsenkov avatar
    734 posts

    Posted 08 Dec 2010 Link to this post

    Hello Rohan,

    The example that you mention does exactly the same thing - checks the html element on which the drop occurs. You can check the dropOnHtmlElement function on this demo's code pages for reference.

    Nikolay Tsenkov
    the Telerik team
    Browse the vast support resources we have to jumpstart 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