We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Dynamically removing controls from DockingManager

Thread ID:

Created:

Updated:

Platform:

Replies:

94339 May 7,2010 03:16 PM UTC May 8,2010 07:28 AM UTC WinForms 1
loading
Tags: Tools
Colin Lomas
Asked On May 7, 2010 03:16 PM UTC

I am trying to create new docked controls (my own user controls) in code at runtime.

I can create them fine but I'm not sure how I can programmatically remove them from the DockingManager. I've tried simply disposing the control but it kills the Controls array in the DockingManager which in turn breaks the display and eventually throws an error.

I can't seem to find anything on the DockingManager itself to unload or undock a control.

Any ideas what I can do?

thanks

Vallarasu S [Syncfusion]
Replied On May 8, 2010 07:28 AM UTC

Hi Colin,

Thanks for your interest in Syncfusion products.

You can use SetEnableDocking method of DockingManager to dock or undock a control from the DockingManager as follows,

//To Dock a control
if(!dockingManager1.GetEnableDocking(listBox1))
dockingManager1.SetEnableDocking(listBox1, true);
//To Undock a control
if (dockingManager1.GetEnableDocking(listBox1))
dockingManager1.SetEnableDocking(listBox1, false);

Refer the sample at the following link which demonstrates the above

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=DockingManagerSample709357893.zip

Please let me know if i have misunderstood your question.

Regards
Vallarasu S.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;