reorder Tabbed Document

3 posts, 1 answers
  1. Andre
    Andre avatar
    41 posts
    Member since:
    Feb 2018

    Posted 11 Jun 2018 Link to this post

    why doesn't the same order appear when i hide with

                    DashboardTab_taskAll.DockState = DockState.Hidden;
                    DashboardTab_archived.DockState = DockState.Hidden;

    and display with

                    DashboardTab_taskAll.DockState = DockState.TabbedDocument;
                    DashboardTab_archived.DockState = DockState.TabbedDocument;

    ?

    thank !

    andré

  2. Answer
    Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3895 posts

    Posted 12 Jun 2018 Link to this post

    Hello, André,  

    When you add/show a new document it is placed considering the RadDock.DocumentManager.DocumentInsertOrder. The default value is DockWindowInsertOrder.InFront. Hence, the documents are placed in front. In other words, when you make visible the Overview document, it is located at first position. Then, when you make visible the Archived document it is placed in front of the Overview window. It is by design. You can change the order by using the DocumentTabStrip.Controls.SetChildIndex method passing the desired window and index. Here is a sample code snippet:
    private void radButton2_Click(object sender, EventArgs e)
    {
        this.overviewWindow.DockState = DockState.TabbedDocument;
        this.archivedWindow.DockState = DockState.TabbedDocument;
     
        this.documentTabStrip1.Controls.SetChildIndex(this.overviewWindow, 0);
    }

    An alternative solution is to use the save/load layout functionality that RadDock supports. Thus, you can store the current layout before hiding the document windows and restore it after hiding and showing them again: https://docs.telerik.com/devtools/winforms/dock/loading-and-saving-layouts/loading-and-saving-layouts

    I hope this information helps. If you have any additional questions, please let me know. 

    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Andre
    Andre avatar
    41 posts
    Member since:
    Feb 2018

    Posted 12 Jun 2018 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    hi dess

    best thanks for the solution. works great !

    andré

Back to Top