New to Telerik UI for ASP.NET Core? Download free 30-day trial

Toolbar template

Loading Demo...
  • Edit in Theme Builder
  • toolbar_template.cshtml
  • Toolbar_TemplateController.cs
  • ProductService.cs
  • ProductViewModel.cs

Also available for:



The Telerik ASP.NET Core Grid component exposes an option to define a content template for its toolbar.

Here you can see a sample implementation of a toolbar template incorporating a dropdownlist HtmlHelper to list the records in the ASP.NET Core Grid by category. The dropdownlist is populated with the list of categories and the filter is applied on its change event by invoking the grid.dataSource.filter() method from the data source client-side API.

Note that the toolbar template is instantiated by the .ToolBar(toolbar => { toolbar.ClientTemplateId("GridToolbarTemplate");}) method. The method expects the id of the script element which holds the client template as a string parameter.

More about Telerik Grid for ASP.NET Core

Support & Learning Resources