Dragging and dropping outside controls into dockzones

5 posts, 0 answers
  1. NLV
    NLV avatar
    87 posts
    Member since:
    Aug 2009

    Posted 17 Sep 2010 Link to this post

    Hello

    I'm trying to create a visual designer kind of control

    I've a panel (toolbox) at the top with some buttons or some other control (which represents a control or tool like box, circle, grid etc.).

    i've the dock zones at the bottom of the panel. When i drag a button from the toolbox to the dockzone i want to trap that event and i want to add a dock in that dockzone corresponding to the tool dropped there.

    Any ideas as how to do this?

    Thank you.
  2. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 22 Sep 2010 Link to this post

    Hello NLV,

    We have two examples that I think will help you implement the desired scenario. I have attached them to the thread.

    One of them shows how to create a RadDock object on the client by initially dragging a fixed dock inside a zone that acts as a toolbox. Please note that there is no server side interaction - the docks are created on the client only. You should modify it to suit your specific scenario.

    The other example shows how to create RadDock objects by having the initial drag come from a RadTreeView control. This example creates the dock controls on the server-side and adds them to the specific zone.

    I hope this helps.

    Kind regards,
    Pero
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. NLV
    NLV avatar
    87 posts
    Member since:
    Aug 2009

    Posted 24 Sep 2010 Link to this post

    Thanks for your samples. It is helping a lot.
  5. NLV
    NLV avatar
    87 posts
    Member since:
    Aug 2009

    Posted 25 Sep 2010 Link to this post

    I'm using DockTookBoxDemo code to mock that toolbox control. But i'm getting the following javascript error when i used your code.

    Microsoft JScript runtime error: 'null' is null or not an object

    I debugged it and found that when you call

    //Create a RadDock's clone<br>
    var clonedDock = dock.clone();

    it is breaking at the following line in ScriptResource.axd

    j.setAttribute("id",l+"_T");

    Any ideas?
  6. Rumen
    Admin
    Rumen avatar
    12850 posts

    Posted 29 Sep 2010 Link to this post

    Hello NLV,

    I tested the DockTookBoxDemo demo with version 2010.2.826 of Telerik.Web.UI.dll and it works fine in IE, Firefox and Chrome. My recommendation is to test the project with the latest available version of Telerik.Web.UI.dll and if the problem pops up again to provide detailed steps on how to reproduce it on our end.

    Best regards,
    Rumen
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017