RadControls for ASP.NET AJAX RadDock controls are designed to be dragged by the user and dropped to various locations around the Web page.
Initiating a drag operation
The DockHandle property controls where the user must click on the RadDock control to initiate a drag operation.
DockHandle = "TitleBar"
When DockHandle is "TitleBar", the user initiates a drag operation by clicking anywhere on the title bar of the RadDock control. When the user hovers the mouse over the title bar, the cursor changes to a move icon:
When the user clicks on the title bar and begins to drag, the cursor changes to the drag icon:
DockHandle = "Grip"
When DockHandle is "Grip", the RadDock control does not display a title bar. This maximizes the content area, but provides no access to the command icons. The user initiates a drag operation by clicking on the "Grip" area at the top of the control. When the user hovers the mouse over the "Grip" area, the cursor changes to a move icon:
When the user clicks on the title bar and begins to drag, the cursor changes to the drag icon:
DockHandle = "None"
When DockHandle is "None", the RadDock has no built-in area for the user to initiate a drag operation. You can specify your own handle for dragging by using the client-side set_handle method inside an OnClientInitialize event handler:
CopyJavaScript
function SetTheDockHandle(dock, args)
{
var calendar = $find("<%= RadCalendar1.ClientID %>");
dock.set_handle(calendar.get_element());
}
The user can then initiate a drag operation by clicking on the element you have specified:
Dropping the control
When the RadDock control is dragged over a location where it will be docked in a RadDockZone control if the user drops it, the RadDockZone indicates where the RadDock control will be docked:
The ForbiddenZones and DockMode properties control where the user can drop a RadDock control at the end of a drag operation. If the user drops the control in any location not allowed by the ForbiddenZones and DockMode properties, it snaps back to its previous location.
Using ForbiddenZones
The ForbiddenZones property lists the dock zones where the RadDock control can't be docked. ForbiddenZones is a list of strings, each of which matches the UniqueName property of a RadDockZone control. When the user drags the RadDock control over a RadDockZone whose UniqueName property matches a string in the ForbiddenZones property, the RadDockZone does not indicate a docking rectangle and the user cannot dock the RadDock control in that zone.
For a live example of the ForbiddenZones property, see Forbidden Zones.
Using DockMode
DockMode controls whether the RadDock control must be docked in a RadDockZone control, or whether it can be dropped anywhere on the page, to act as a floating control. DockMode can be set to one of three values:
Default: When DockMode is "Default", the RadDock control can be either docked or floating. The user can drag it to any location.
Floating: When DockMode is "Floating", the RadDock control can not be docked in any dock zone. The user can drag it to any location, but when dropped over a dock zone, it remains floating.
Docked: When DockMode is "Docked", the RadDock control must be docked in a dock zone. The user can only drag it to a new position within its current dock zone or drag it to a new dock zone.
For a live example of the DockMode property, see DockMode.
See Also