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

Prevent Moving from Right zone to Left zone in Raddock...

1 Answer 66 Views
Dock
This is a migrated thread and some comments may be shown as answers.
raaj
Top achievements
Rank 1
raaj asked on 06 Jan 2012, 04:37 PM

Hi,

I've 2 RadDockZones (Left & Right) in my web ASP.Net AJAX web application.
In Leftside zone I've usercontrols like SingleLineText, Dropdown, CheckBox etc.
I can drag these controls from left zone to Right zone. But I want to prevent the moving from Right zone to left zone or any other part in that page.

//Thanks,

1 Answer, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 11 Jan 2012, 09:43 AM
Hi Raaj,

You can achieve the desired effect by following these steps:

1. Handle the client event OnClientDragEnd of the RadDock control. This event is fired on drag end of the dock controls and it will allow you to detect whether a RadDock is dropped in the right RadDockZone.

2. When a RadDock is placed in the right RadDockZone, you can use the dock's Client API in order to disable its dragging functionality if you want to prevent its movement at all or set the other RadDockZones as forbidden zones so that the dock control can be docked only in the right dock zone.

For your convenience I have created a sample that demonstrates the suggested approach. Please use it as a reference for incorporating this feature into your actual project.

Greetings,
Slav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Dock
Asked by
raaj
Top achievements
Rank 1
Answers by
Slav
Telerik team
Share this question
or