Navigating Between Tab Items
- 2 minutes to read
DXTabControl displays a set of tabs (tab items), providing a web application with a tab-based navigation functionality. Tab items are visually identified by their headers, displayed within the Header Panel.
An end-user can navigate between tab items by clicking their headers, which results in selecting the tab item. To select a tab item in code, use the DXTabControl.SelectedIndex or DXTabControl.SelectedItem property. Tab items can also be selected using the DXTabControl.SelectNext and DXTabControl.SelectPrev methods.
An end-user can use the header menu to navigate between tab items. The header menu is invoked when clicking an arrow displayed in the corner of DXTabControl.
The header menu's items correspond to tab items. Clicking a menu item automatically selects the corresponding tab item.
Before a tab item is selected, the DXTabControl.SelectionChanging event is fired, allowing you to cancel the action. To do this, set the event parameter's TabControlSelectionChangingEventArgs.Cancel property to true. Use the TabControlSelectionChangedEventArgs.OldSelectedIndex property to obtain the index of the previously selected tab item. After the tab item has been selected, the DXTabControl.SelectionChanged event is fired.
In particular Views, if the number of tab headers is too big to entirely fit into the Header Panel, some of them are not visible on the screen. To learn how to navigate between tab items in different views, see Views.