Programmatically select the raddocument tab in raddock

2 posts, 0 answers
  1. Roger
    Roger avatar
    16 posts
    Member since:
    Apr 2011

    Posted 28 Aug 2014 Link to this post

    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.
  2. Dess | Tech Support Engineer, Sr.
    Dess | Tech Support Engineer, Sr.  avatar
    3321 posts

    Posted 02 Sep 2014 Link to this post

    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.

    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.
Back to Top