You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/grid/toolbar.md
+89-40Lines changed: 89 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,11 @@ position: 45
10
10
11
11
# Grid Toolbar
12
12
13
-
The [Blazor Grid](https://demos.telerik.com/blazor-ui/grid/overview) 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.
13
+
The [Blazor Grid](https://demos.telerik.com/blazor-ui/grid/overview) toolbar can render built-in and custom tools. This article describes the built-in tools and shows how to add [custom tools](#custom-tools) or create a [custom toolbar](#custom-toolbar-configuration).
14
14
15
15
## Built-in Tools
16
16
17
-
By default, the [Blazor Grid](https://demos.telerik.com/blazor-ui/grid/overview)displays all its built-in tools in the order below. Use the tool tag if you need to define a tool explicitly in a [custom toolbar configuration](#toolbar-configuration).
17
+
By default, the [Blazor Grid](https://demos.telerik.com/blazor-ui/grid/overview)does not automatically render all built-in tools when a toolbar is added. To include specific tools in a [toolbar configuration](#toolbar-tools-configuration), you need to explicitly define them using the tool tags below.
18
18
19
19
### Command Tools
20
20
@@ -29,8 +29,6 @@ By default, the [Blazor Grid](https://demos.telerik.com/blazor-ui/grid/overview)
| Spacer |`GridToolBarSpacerTool`| Consumes the available empty space and pushes the rest of the tools next to one another. |
@@ -39,52 +37,51 @@ By default, the [Blazor Grid](https://demos.telerik.com/blazor-ui/grid/overview)
39
37
40
38
In addition to built-in tools, the Grid also supports custom tools. Use the `<GridToolBarCustomTool>` tag, which is a standard Blazor `RenderFragment`. See the example below.
41
39
42
-
## Toolbar Configuration
40
+
## Toolbar Tools Configuration
43
41
44
-
Add a `<GridToolBar>` tag inside `<TelerikGrid>` to configure a custom toolbar, for example:
42
+
Add a `<GridToolBar>` tag inside `<TelerikGrid>` to configure a toolbar, for example:
45
43
46
44
* Arrange the Grid tools in a specific order;
47
45
* Remove some of the built-in tools;
48
46
* Add custom tools.
49
47
50
-
>caption Customize the Grid toolbar
48
+
>important When configuring the Toolbar, you can use either the `<GridToolBar>` or the `<GridToolBarTemplate>`. Note that both cannot be used together.
@@ -158,26 +144,89 @@ Add a `<GridToolBar>` tag inside `<TelerikGrid>` to configure a custom toolbar,
158
144
159
145
public int? AgeInYears { get; set; }
160
146
161
-
public decimal? GraduateGrade { get; set; }
162
-
163
147
public DateTime HireDate { get; set; }
148
+
}
149
+
}
150
+
````
164
151
165
-
public DateTime MeetingDate { get; set; }
152
+
## Custom Toolbar Configuration
166
153
167
-
public Person()
168
-
{
169
-
GraduateGrade = 1;
170
-
}
154
+
Add a `<GridToolBarTemplate>` tag inside `<TelerikGrid>` to configure a custom toolbar. You can add your own HTML and components to create a more complex layout in the grid header to match your business needs and also `GridCommandButton` instances (read more about the features available in those buttons in the [Command Column](slug://components/grid/columns/command) article).
0 commit comments