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

reorder Tabbed Document

2 Answers 7 Views
This is a migrated thread and some comments may be shown as answers.
Andre
Top achievements
Rank 1
Andre asked on 11 Jun 2018, 01:51 PM

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 Answers, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 12 Jun 2018, 07:50 AM
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.
0
Andre
Top achievements
Rank 1
answered on 13 Jun 2018, 04:55 AM

hi dess

best thanks for the solution. works great !

andré

Tags
Dock
Asked by
Andre
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Andre
Top achievements
Rank 1
Share this question
or