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

Question: How do I re-order tabpages

1 Answer 34 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jorge Gonzalez
Top achievements
Rank 1
Jorge Gonzalez asked on 11 Jan 2010, 07:01 PM
Hello,
     I have a 5 tabpage tab control. I hide tabpages 3,4, and 5. When I show tabpages 3 and 5 and do not show tabpage 4 I have a gap in between. What's the command or procedure to move tabpage 5 to where tabpage 4 is and tabpage 4 to where tabpage 5 is?
Thanks

1 Answer, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 12 Jan 2010, 06:39 PM
Hello Jorge Gonzalez,

There is no real way to move items but you can simply remove and add an item like so:

var itemToMove = tabControl.Items[4];
tabControl.Items.RemoveAt(4);
tabControl.Items.Insert(2, itemToMove);

I can also suggest using filterign for hiding the items by assigning a predicate to the items' filter:

tabControl.Items.Filter

Sincerely yours,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Jorge Gonzalez
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
Share this question
or