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. Image for the cookie policy date

How to save and restore children added to DockingManager?


I add UserControls to DockingManager at runtime. Then I save the DockingManager state as follows.

private void SaveDockingManager_Click(object sender, RoutedEventArgs e)


XmlWriter writer = XmlWriter.Create("DockStates.xml");




When I close and open the application, I load as follows, but it does not load. I didn't understand why. Can you help me please ?

private void LoadDockingManager_Click(object sender, RoutedEventArgs e)


XmlReader reader = XmlReader.Create("DockStates.xml");




Is there a way to reload user controls added at runtime even if the application is closed and reopened?

The layout works correctly if the application is not closed and opened and I do not close the relevant user controls.

This UserControl hosts an SfDataGrid. Is it possible that this SfDataGrid comes with filtering features already implemented?

1 Reply

BA BagavathiPerumal Apranandham Syncfusion Team May 3, 2023 01:07 PM UTC

Hi Ozgur,

Query1: How to save and restore children added to DockingManager.

It is by design that DockingManager will only save and load the layout information of the children. It doesn’t save the control information. So, you must add your custom control prior to loading the saved layout of the DockingManager. Please refer to the attached video and sample for your reference.

Query2: Is it possible that this SfDataGrid comes with filtering features already implemented.

We suspect that you want to display the datagrid with a filter when you reopen the application, and this requirement can be achieved by using Serialization and DeSerialization concepts. Please refer to the below UG links for more information.



If we misunderstood your requirement, kindly share more information regarding this. 

Bagavathi Perumal A

Attachment: DockingManagerStatePersistence_8bcb2832.zip

Live Chat Icon For mobile
Up arrow icon