How to activate a Merged Tab in RibbonControlAdv

Hello,

I have a MDIForm with RibbonControlAdv and a Child Form which has a RibbonPanelMergeContainer.

Everything works as espected with merging in RibbonControlAdv.

However, when a child is opened, I need the Active Tab in MdiForm to be the recently opened Child Merged Tab.

How can I do this? in MdiForm when I call the Child Form?

Thanks.

1 Reply

KR Kannan R Syncfusion Team September 3, 2018 05:40 AM UTC

Hi Carlos 
 
Thank you for contacting Syncfusion Support.  
 
This reported requirement can be achieved by using SelectedTab property in RibbonControlAdv. Please make use of code snippet in below.  
 
Code Snippet : [C#] 
 
 
            // To Select MDIChildForm when added. 
            foreach (ToolStripTabItem TabItem in this.ribbonControlAdv1.Header.MainItems) 
            { 
                if ((TabItem as ToolStripTabItem).Panel != null 
                    && (TabItem as ToolStripTabItem).Panel is RibbonPanelMergeContainer) 
                { 
                    this.ribbonControlAdv1.SelectedTab = TabItem; 
                    break; 
                } 
            } 
 
 
We have also prepared sample for your reference.  
 
 
Please check and let us know if it helps.  
 
Regards 
Kannan 



Loader.
Up arrow icon