TreeList Toolbar
The Blazor TreeList toolbar can render built-in and custom tools. This article describes the built-in tools and shows how to add custom tools or customize the toolbar.
Built-In Tools
The Blazor TreeList displays all its built-in tools in the order below. Use the respective tool tag if you need to define a tool explicitly in a toolbar configuration.
Command Tools
| Tool Name | Tool Tag | Description |
|---|---|---|
| Add | TreeListToolBarAddTool | An add command that fires the OnAdd event. |
| SearchBox | TreeListToolBarSearchBoxTool | A searchbox that filters multiple TreeList columns simultaneously. |
Layout Tools
| Tool Name | Tool Tag | Description |
|---|---|---|
| Spacer | TreeListToolBarSpacerTool | Consumes the available empty space and pushes the rest of the tools next to one another. |
Custom Tools
In addition to the built-in tools, the TreeList also supports custom tools. Use the <TreeListToolBarCustomTool> tag, which is a standard Blazor RenderFragment. See the example below.
Toolbar Tools Configuration
Add a <TreeListToolBar> tag inside <TelerikTreeList> to configure a toolbar, for example:
- Arrange the TreeList toolbar tools in a specific order;
- Remove some of the built-in tools;
- Add custom tools.
<TreeListToolBar>and<TreeListToolBarTemplate>cannot be used together in the same TreeList instance.
TreeList Toolbar Tools
Custom Toolbar Configuration
Add a <TreeListToolBarTemplate> tag inside <TelerikTreeList> to configure a custom toolbar. You can add your own HTML and components to create a more complex layout in the TreeList header to match your business needs and also TreeListCommandButton instances (read more about the features available in those buttons in the Command Column article).
When using a <TreeListToolBarTemplate>, you need to use the Tab key to navigate between the focusable items. This is because the <TreeListToolBarTemplate> allows rendering of custom elements. On the other hand, the <TreeListToolBar> uses the built-in keyboard navigation through arrow keys.
Custom TreeList Toolbar