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

Programmatically select the raddocument tab in raddock

1 Answer 301 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Roger
Top achievements
Rank 1
Roger asked on 28 Aug 2014, 02:03 PM
Good day,

I am using RadRibbonForm window as my MDI Parent and RadDock AutoMdiDetection = true.
Here is what I am trying to achieve. I do not want to duplicate my window base on the childForm.Text.
Every time the user click a button for form entry, the system will check if the childForm.Text exist in the document tab of raddock.
If it exist, it will focus on that tab, else it will be added in as mdi children.
How to focus on that document tab?

I have explore the raddock properties. ActiveWindow, DocumentArray,and etc are null.

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 02 Sep 2014, 08:49 AM
Hello Roger,

Thank you for writing.

In order to focus on a specific DocumentWindow, you should set it as an ActiveWindow:
private void radButton1_Click(object sender, EventArgs e)
{
    foreach (DockWindow dw in this.radDock1.DockWindows.DocumentWindows)
    {
        if (dw.Text== "documentWindow3")
        {
            this.radDock1.ActiveWindow = dw;
        }
    }
}

I hope this information helps. Should you have further questions, I would be glad to help.

Regards,
Desislava
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
RibbonBar
Asked by
Roger
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or