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

How to drag a dock from one RadTab to another?

1 Answer 54 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Laurent
Top achievements
Rank 1
Laurent asked on 23 Feb 2012, 10:47 AM
The question is in the title :)

Just know that the RadTab are created dynamically, as well as the RadDock.
Is there a way to drag a dock from one tab to another?

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 27 Feb 2012, 04:20 PM
Hi Laurent,

You can achieve such functionality by placing a RadDockZone in every RadPageView of the RadTabStrip control. This way you will be able to move a RadDock from one page view to another. Note that the RadTabStrip should be wrapped in a RadDockLayout so that the layout of the dock controls is persisted through postback.

As only one tab is selected at a time, you will have to switch the tabs in order to be able to drag a RadDock from one tab to another. In case you are using the default dock mode (RadDock's DockMode property is set to Default), you can just drag the RadDock outside the RadTabStrip control, change the tab manual and drag it in the new RadDockZone. If you have configured the RadDock with DockMode="Docked", changing its position will require some customization, because the tabs of RadTabStrip do not switch on mouseover out-of-the-box. To achieve the desired functionality in such a case, you can use the RadDock's OnClientDragStart client-side event in order to attach a handler for the mousemove event, which will be utilized to detect the position of the cursor while a dock controls is being dragged. When the cursor is positioned over a tab, the client-side method set_selected(true) of the RadTab object should be used to change the tab and to move the RadDock in the new RadDockZone.

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
Laurent
Top achievements
Rank 1
Answers by
Slav
Telerik team
Share this question
or