Programmatically Order Ribbon Tabs

2 Answers 55 Views
RibbonBar RibbonForm
levenzer
Top achievements
Rank 1
Iron
levenzer asked on 27 Jun 2022, 01:36 PM

Hi.

I want the user to be able to sort the tabs as they want.

Is there any way to sort the tabs programmatically?  

2 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 28 Jun 2022, 10:30 AM

Hi Özer Levent,

The order of the tabs in the ribbon depends on the order of the RibbonTab objects in the CommandTabs collection. You can reorder them by reordering the items in this collection. Check the following code snippet.

private void RadButton1_Click(System.Object sender, System.EventArgs e)
{
    RibbonTab firstTab = RadRibbonBar1.CommandTabs(0);
    RadRibbonBar1.CommandTabs.Remove(firstTab);
    RadRibbonBar1.CommandTabs.Insert(1, firstTab);
}

Regards,
Dinko
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
levenzer
Top achievements
Rank 1
Iron
answered on 30 Jun 2022, 10:17 PM

Hi Dinko.

Thank you for reply. I'll try this.

Tags
RibbonBar RibbonForm
Asked by
levenzer
Top achievements
Rank 1
Iron
Answers by
Dinko | Tech Support Engineer
Telerik team
levenzer
Top achievements
Rank 1
Iron
Share this question
or