tabbed form controls are not populating

I'm attempting to dynamically add forms as tabbed documents, similar to a Visual Studio layout. I've looked at all of the Syncfusion examples, have it working, but am having an odd issue.
When the first form is docked as a document, the controls on the form populate with data without issue. Using the exact same code, when the 2nd and subsequent forms are docked as documents, the controls on the form do not show their data.

Let me outline what I have.

First off, the main form has the property IsMDIContainer = false;
On this main form, I have a button that opens another form, which adds it as a document (tabbed).

public void InitializeDockingManager()
{
     // here are the settings for my docking manager
    DockingManager1.EnableDocumentMode = true;
    DockingManager1.ThemeName = "Office2019Colorful";

    DockingManager1.AllowTabsMoving = true;
    DockingManager1.AutoHideSelectionStyle = Syncfusion.Windows.Forms.Tools.AutoHideSelectionStyle.MouseHover;
    DockingManager1.CanApplyTheme = true;
    DockingManager1.CanOverrideStyle = true;
    DockingManager1.CloseTabOnMiddleClick = false;
    DockingManager1.HostControl = this;
    DockingManager1.HostFormClientBorder = false;
    DockingManager1.DockTabAlignment = DockTabAlignmentStyle.Bottom;
    DockingManager1.DisallowFloating = false;
    DockingManager1.EnableContextMenu = false;
    DockingManager1.EnableDragAutoHiddenTabs = true;
    DockingManager1.MenuButtonEnabled = true; 
    DockingManager1.MDIActivatedVisibility = false;
    DockingManager1.EnableDoubleClickOnCaption = false;
    DockingManager1.PersistState = true;
    DockingManager1.ShowMetroCaptionDottedLines = true;
    DockingManager1.AnimateAutoHiddenWindow = false;
    DockingManager1.FullCaptionsInAutoHideMode = true;
    DockingManager1.EnableAutoHideTabContextMenu = true;
    DockingManager1.ShowCaption = true;
    DockingManager1.CloseEnabled = true;
    DockingManager1.DragProviderStyle = Syncfusion.Windows.Forms.Tools.DragProviderStyle.Office2016Colorful;
    DockingManager1.SplitterWidth = 5;
    DockingManager1.ShowDockTabScrollButton = true;

    DockingManager1.DocumentWindowSettings.ActiveTabFont = new Font("Segoe UI", 9, FontStyle.Regular, GraphicsUnit.Point);
    DockingManager1.DocumentWindowSettings.ShowCloseButton = false;
    DockingManager1.DocumentWindowSettings.EnableTabGroup = true;
    DockingManager1.DocumentWindowSettings.ShowTabList = true;

    ResetWindowLayout();

    DockingManager1.LoadDockState();
}

public void ResetWindowLayout()
{
    DockingManager1.SetEnableDocking(panel1, true);
    DockingManager1.SetEnableDocking(panel2, true);
    DockingManager1.SetEnableDocking(panel3, true);

    DockingManager1.SetDockLabel(panel1, "label1");
    DockingManager1.SetDockLabel(panel2, "label2");
    DockingManager1.SetDockLabel(panel3, "label3");

    DockingManager1.SetCloseButtonVisibility(panel1, true);
    DockingManager1.SetCloseButtonVisibility(panel2, true);
    DockingManager1.SetCloseButtonVisibility(panel3, true);

    DockingManager1.SetMenuButtonVisibility(panel1, false);
    DockingManager1.SetMenuButtonVisibility(panel2, false);
    DockingManager1.SetMenuButtonVisibility(panel3, false);

    DockingManager1.SetDockVisibility(panel1, true);
    DockingManager1.SetDockVisibility(panel2, true);
    DockingManager1.SetDockVisibility(panel3, true);

    DockingManager1.DockControl(panel2, this, Syncfusion.Windows.Forms.Tools.DockingStyle.Left, 250);
    DockingManager1.DockControl(panel1, panel2, Syncfusion.Windows.Forms.Tools.DockingStyle.Top, 250);
    DockingManager1.DockControl(panel3, panel2, Syncfusion.Windows.Forms.Tools.DockingStyle.Bottom, 250);
}

In the button click event I have the following:


    MyForm form1 = new MyForm()
    {
        Tag = "form1tag"
    };
     // NOTE: form1 has many controls including statusstrip, toolstrip, toolstripmenuitem, panel, contextmenustrip, sfdatagrid, tabcontroladv, label
    DockingManager1.SetEnableDocking(form1, true);

    DockingManager1.LockDockPanelsUpdate();
    DockingManager1.LockHostFormUpdate();

    DockingManager1.SetWindowMode(form1, WindowMode.Document);

    DockingManager1.UnlockHostFormUpdate();
    DockingManager1.UnlockDockPanelsUpdate();

I don't understand why this happens. Each new instance of form1 above when not subjected to document mode opens just fine and the controls populate.
Additionally, if I take the first instance and untab it, i.e. make it a floating window, and then click the button to open another form1, it works just fine. The problem only happens when there is at least one window in document (tabbed) mode.

I'm hoping someone will be able to assist. I'm wondering if this is some sort of painting issue with the tabbed document?


6 Replies

ST Stoked June 3, 2021 04:16 AM UTC

Support, just an FYI, this exact behavior can be replicated with your MDI demo within Essential Studio, version 19.1.0.54.
Notice that the form1.cs content is shown, while the content of the program.cs file is NOT shown.

Now, close both tabs by pressing the 'x' on the tab. Now double-click the form1.cs in the "Solution Explorer" and you'll notice that the contents of form1.cs are now NOT visible. This is exactly what I'm experiencing in my original post, tabbed controls are missing when docked as tabs.

Hopefully that helps. Let me know what the resolution would be.


BR Bharathi Rajakantham Syncfusion Team June 4, 2021 02:48 PM UTC

Hi Stoked, 

Thanks for contacting Syncfusion Support. 

We can’t be able to replicate the reported issue the content of form1.cs and the program.cs are loading properly for us. Please check the sample and the video for your reference. 



Please ensure the sample and the video and confirm us whether our replication procedure is same as yours. If not please share the issue reproducing project file and the video for the same. It will be helpful for us to proceed further and provide a prompt solution on this. 

Regards, 
Bharathi R 



ST Stoked June 4, 2021 07:05 PM UTC

Support, I watched your video and can confirm that what was done is exactly what I performed, but the contents of one of the .cs files did not appear.
Can I ask which Syncfusion version you were using? Here I'm using 19.1.0.63.


BR Bharathi Rajakantham Syncfusion Team June 7, 2021 02:27 PM UTC

Hi Stoked, 

Thanks for your update. 

We have shared you the sample in 19.1.0.45 version in our previous update and now we have also ensured with the 19.1.0.63 version. The content of form1.cs and the program.cs are loading properly for us. Can you please ensure with the provided sample and if you still face an issue please share us more details on it. If possible, share the issue reproducing video and the project file for the same. It will be helpful for us to proceed further and provide a prompt solution on this. 


Regards, 
Bharathi R 



ST Stoked June 8, 2021 03:15 AM UTC

To resolve the issue I removed all versions of  Syncfusion from Windows and the GAC and am solely relying on the Nuget packages for my project. This seemed to have rectified the issue and must have been a conflict with an earlier version installed on my test system. Thanks.


BR Bharathi Rajakantham Syncfusion Team June 9, 2021 11:12 AM UTC

Hi Stoked, 

Thanks for your update. 

We were happy to hear that the reported issue has been resolved at your end. Please let us know if you have any other concerns, we will be glad to assist you. 

Regards, 
Bharathi R 


Loader.
Up arrow icon