Toolbar
Since 0.1.0-alpha.20
The members for toolbar, and the types they use. Every member of
IzzyBlazor.DataGrid<TItem> is on the DataGrid API.
Properties (5)
ToolbarLabelsbool = falseText beside the icons of the toolbar's own tools, for a grid people use now and then. Without it they're icons with a tooltip, for one used all day. A tool's own ShowText goes first.
ToolbarContentRenderFragment?The page's own controls in the toolbar above the grid: ToolbarButton, ToolbarMenu and the like. Write DataGridSearch, DataGridExport or DataGridColumnPicker here to place the grid's own among them. While rows are selected, the selection bar takes its place. The grid reads this once more on each render, to see which of its tools are here, so nothing in it should count or consume anything.
Searchablebool = falseA search box in the toolbar, across the text columns. The words go in the address (?search=) and reach an ItemsProvider as the request's Search. With no script they apply on Enter.
NoMatchesTextstring? = "No matches for “{0}”"A grid's text when its search matches no rows, with {0} for the words: "No customers match “{0}”". Defaults to "No matches for “{0}”". EmptyContent is for when there are no rows at all.
NoMatchesContentRenderFragment<string>?Shown in place of NoMatchesText when a grid's search matches no rows, with the words searched for as its context: an EmptyState with an icon and a line on what to try. The grid's own "Clear search" stays under it, so it needs no action of its own.
Parts (4)
Components written inside DataGrid, and the columns' members, which PropertyColumn, TemplateColumn and DynamicColumn share.
DataGridSearch
Puts a DataGrid's search box, from Searchable, among your toolbar items. It stays in the bar, as a box.
DataGridExport
Puts a DataGrid's export, from ExportExcelHref, ExportCsvHref and any DataGridExportFormat, among your toolbar items: a link with one format, or with more a button with a chevron that opens a menu of links. At the end unless Position says otherwise.
Priorityint = 0Which items stay longest when there's no room: higher stays longer. Defaults to 0.
When it moves into the "…" menu. Defaults to the menu on a phone and, from 640px up, the bar while there's room: new() { Base = ToolbarOverflow.Always, Sm = ToolbarOverflow.Auto }.
ShowLabelbool? (computed)Its text beside its icon, or only its icon. Defaults to the grid's ToolbarLabels.
PositionToolbarPosition = ToolbarPosition.EndWhere it sits, among the items of that position in the order they're written.
Forstring?The id of the grid it acts on, when it's outside the grid. Leave it out in the grid's ToolbarContent, or in a Tile or Card with one grid: it acts on that one.
DataGridFilter
A column's filter in a DataGrid's toolbar, beside the search: a button named for the column that opens the column's own filter panel and says what it's set to ("Status: Locked"). Its filter is the column's, kept in the address under the same keys, so the column's header has no funnel of its own. For the filters people reach for first, such as Status and Role; the rest stay in the headers.
Columnstring requiredThe column whose filter it has, by its key: its SortKey, or for a PropertyColumn the property's path, as the address names it ("Status"). The column must be Filterable.
PositionToolbarPosition = ToolbarPosition.StartWhere it sits, among the items of that position in the order they're written.
Forstring?The id of the grid it acts on, when it's outside the grid. Leave it out in the grid's ToolbarContent, or in a Tile or Card with one grid: it acts on that one.
DataGridColumnPicker
Puts a DataGrid's Columns button, from ColumnPicker, among your toolbar items. It stays in the bar, at the start with the other tools that shape the view (search, filters) unless Position says otherwise; what acts on the data (export, add) is at the end.
Priorityint = 0Which items stay longest when there's no room: higher stays longer. Defaults to 0.
When it moves into the "…" menu, where Columns opens the list in a dialog. Defaults to the menu on a phone and, from 640px up, the bar while there's room: new() { Base = ToolbarOverflow.Always, Sm = ToolbarOverflow.Auto }.
ShowLabelbool? (computed)Its text beside its icon, or only its icon. Defaults to the grid's ToolbarLabels.
PositionToolbarPosition = ToolbarPosition.StartWhere it sits, among the items of that position in the order they're written.
Forstring?The id of the grid it acts on, when it's outside the grid. Leave it out in the grid's ToolbarContent, or in a Tile or Card with one grid: it acts on that one.
Types (2)
ToolbarOverflow
enumWhen an item of a Toolbar moves into its "…" menu.
| Value | Description |
|---|---|
Auto | When there's no room for it, in order of |
Never | Never: it stays in the bar, such as the main action. |
Always | Always: it's only in the menu, such as Print or Version history. |
ToolbarPosition
enumWhere an item of a Toolbar sits.
| Value | Description |
|---|---|
Start | At the start (the left in left-to-right text), the default. |
Center | In the middle, kept centered between the start and the end. |
End | At the end, before the "…" menu. |