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

Dragging and dropping outside controls into dockzones

4 Answers 98 Views
Dock
This is a migrated thread and some comments may be shown as answers.
NLV
Top achievements
Rank 1
NLV asked on 17 Sep 2010, 08:33 AM
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.

4 Answers, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 22 Sep 2010, 12:57 PM
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
0
NLV
Top achievements
Rank 1
answered on 24 Sep 2010, 12:53 PM
Thanks for your samples. It is helping a lot.
0
NLV
Top achievements
Rank 1
answered on 25 Sep 2010, 10:48 AM
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?
0
Rumen
Telerik team
answered on 29 Sep 2010, 03:43 PM
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
Tags
Dock
Asked by
NLV
Top achievements
Rank 1
Answers by
Pero
Telerik team
NLV
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or