Re-ordering Tabs
Greetings from Syncfusion Support.
We have checked the reported query 're-order tab items' at our end and let you know that you can dynamically re-order the tab items with drag functionalities. Please refer to the following demo and UG link.
https://blazor.syncfusion.com/demos/tabs/drag-and-drop?theme=bootstrap4
Regards,
Hareesh.
|
void ReorderItemClick()
{
if (TabItems.Count > 0)
{
TabData item = TabItems[TabItems.Count - 1];
TabItems.Insert(1, item);
TabItems.RemoveAt(TabItems.Count - 1);
} } |
- Share more details about your requirement
- Share tab related code snippets
You are most welcome..! We are glad that our provided solution helped you.
Regards,
Your not really reordering the Tabs though are you - your sample is actually just relabelling the existing tab header and content based on the values in your class. You are not picking up the last tab and putting it in second spot. Is there a way to physically reorder the tabs?
For example - if i had a series of orders on a grid (say 3) - each on its own tab and labelled accordingly in the header
Tab 1 - Order 2, Tab 2 - Order 4, Tab3 - Order 8.
I then select to Add Order 6.
I want Order 6 to appear in numerical order - so moved tab and all to position 3 ,and Order 8 moved to position 4.
Right now no matter what i do - Order 6 will end up as the last Tab.
Is there a way to do this properly and not as per your example - just relabelling and not really moving it.
Regards
Steve
i want to be able to order them programmatically? is this not possible?
- 9 Replies
- 5 Participants
- Marked answer
-
WC Woody Chin
- Apr 19, 2021 12:32 PM UTC
- Feb 18, 2022 10:26 AM UTC