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

Edit mode and live mode

1 Answer 32 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Eddie Conner
Top achievements
Rank 1
Eddie Conner asked on 19 Aug 2011, 06:00 AM
i am working on creating a page that when is in edit mode, the RadDockLayout, RadDockZones and RadDocks will dynamically be loaded. The user will be able to add controls, drag and drop etc. However, when in live mode I of course do not want the RadDock features.  I still want to use RadDock features to load the zones from state and locate the docks from the state. However, when the page is rendered, I do not want the docking abilities in live mode.

What is the best practice to disable for live mode?

1 Answer, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 24 Aug 2011, 11:53 AM
Hello Eddie,

If I understand your case correctly, in live mode you want your RadDocks to be static. For example they shouldn't be dragable and no command should be active, in order to deny the user closing or collapsing/expanding the docks.

The RadDock control has a property EnableDrag, which set to false, disables the dragging the docks. When you disable the dragging feature, moving and docking the RadDocks will no longer be available.

You can also hide the commands in the title bar, especially the close command, so that the RadDocks cannot be closed, when live mode is active. For this purpose you can set the DefaultCommands property of the RadDock to None, if you want to hide all commands:
RadDock1.DefaultCommands = Telerik.Web.UI.Dock.DefaultCommands.None;

You can also specify the exact commands to be displayed, by using the same property, as show below:
RadDock1.DefaultCommands = Telerik.Web.UI.Dock.DefaultCommands.ExpandCollapse | Telerik.Web.UI.Dock.DefaultCommands.Close;

Another approach to specify a custom set of commands is to add them to the Commands collection of the RadDock. This method will override the commands, set via the DefaultCommands property.
RadDock1.Commands.Add(new DockCloseCommand());
 
I hope the provided information helps. Please let us know if you need additional assistance in order to achieve the desired functionality.

Kind regards,
Slav
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Dock
Asked by
Eddie Conner
Top achievements
Rank 1
Answers by
Slav
Telerik team
Share this question
or