Your search did not match any results.
Data Grid

Toolbar Customization

The DataGrid uses an integrated DevExtreme Toolbar component to display predefined and custom commands. To add or remove toolbar items, implement the onToolbarPreparing function. Use its parameter's toolbarOptions field to access the Toolbar's configuration object. This object includes the command collection: the toolbarOptions.items array.

This demo illustrates how to add the following items to the toolbar:

  • DevExtreme components
    Specify a component that you want to add and its options. In this demo, we extended the toolbar's item collection with a Button and a SelectBox.

  • Custom elements
    Specify a template for your custom element. In this demo, the custom element displays the total group count.

  • Predefined controls
    The availability of predefined controls depends on whether a specific DataGrid feature is enabled. For example, this demo enables the columnChooser, and the toolbar displays the Column Chooser button. You can customize the predefined controls in the onToolbarPreparing function. Refer to its description for a code example.

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