Skip to main content
A newer version of this page is available. .

Selecting Tab Items

An end-user can navigate between tab items by clicking their headers, which results in selecting the tab item. Use the following properties to obtain the selected item.

  • SelectedIndex property specifies the index of the selected tab item.
  • SelectedItem property specifies the selected item.
  • SelectedContainer property specifies the DXTabItem object that represents the selected tab item.
  • IsSelected property specifies whether a DXTabItem is selected.

If one of the selection properties is changed, other properties will be updated accordingly.

If selection has been changed (by either end-user interaction or changes to the items source), the tab control raises the DXTabControl.SelectionChanged event.

DXTabControl also provides the DXTabControl.SelectionChanging event that allows you to cancel selection changes. This event is only raised if the selection is changed via the tab control (for instance when an end-user selects a tab item). If the selection is changed directly by setting one of the selection properties or through a binding, the DXTabControl.SelectionChanging event does not occur. In this case, you need to control changes of the selection properties and cancel them if necessary in your code.

To programmatically change selection, use the DXTabControl.SelectNext and DXTabControl.SelectPrev methods.