DevExtreme v23.1 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.
Tab Panel

Tab Drag & Drop

This demo illustrates how you can allow end-users to reorder, add, and remove tabs within the DevExtreme TabPanel component.

Reorder tabs

Wrap the TabPanel into the Sortable component and set the following properties as needed:

  • filter
    Specify a CSS selector to indicate draggable items. This demo sets filter to .dx-tab.

  • itemOrientation
    Set this property to "horizontal". When a user drags a tab, remaining items move left and right to designate the drop target.

  • onDragStart and onReorder
    Implement these handlers to configure drag and drop logic and modify the dataSource after the tabs are reordered.

Add or remove tabs

This demo adds and removes tabs in the following two functions:

  • addButtonHandler - a click handler for the "Add Tab" button.
  • closeButtonHandler - a click handler for a tab's Close icon. The demo uses the itemTitleTemplate property to display this icon.

Both handlers modify the TabPanel's dataSource.

Thank you for your interest in our ASP.NET Core product libraries and UI component suite. We are moving ASP.NET Core-related demos and content to Please make sure to update your bookmarks with our new URL.

View Demo