-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(Grid): add typed tools toolbar articles #2707
base: master
Are you sure you want to change the base?
Conversation
|
||
## Custom Layout | ||
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also describe the difference in keyboard navigation behavior.
Use the component names in uppercase - Grid.
You can add your own HTML and components to create a more complex layout in the grid header to match your business needs. You can still use the grid command buttons, as well as other components and logic. | ||
|
||
>caption Custom Grid Toolbar Layout | ||
>caption Custom Grid Toolbar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The existing toolbar UI doesn't look good. Consider removing the backgrounds and borders.
- Use a layout that takes up fewer rows. A simple flexbox layout with two buttons on either side of the toolbar is completely enough.
- A DropDownList with no
Value
is uncommon and may serve as a bad example. To keep things simple, it may be best to remove it, rather than making the component do something meaningful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that my comments for the grid are applicable to the treelist, as well.
|
||
To use a toolbar, define the `GridToolBarTemplate` tag of the grid. In it, you can use arbitrary HTML and components to get the desired layout, and also `GridCommandButton` instances in (you can read more about the features available in those buttons in the [Command Column](slug://components/grid/columns/command) article). | ||
## Built-in Tools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our Style Guide calls for capitalizing the first and last word in a hyphenated expression.
## Built-in Tools | |
## Built-In Tools |
|
||
* `ExcelExport` - starts an [Excel export of the grid data](slug://grid-export-excel). | ||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. | |
In addition to the built-in tools, the Grid also supports custom tools. Use the `<GridToolBarCustomTool>` tag, which is a standard Blazor `RenderFragment`. See the example below. |
|
||
>note The toolbar is not associated with an item from the data source. The `Item` and `ParentItem` fields on the click event handler argument of a `TreeListCommandButton` will always be `null`, and the `Edit`, `Update`, `Cancel` commands do not work with it. | ||
By default, the [Blazor TreeList](https://demos.telerik.com/blazor-ui/treelist/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 [toolbar configuration](#toolbar-tools-configuration). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit unclear what "the tool tag" stands for here. Is it "the respective tool tag" (as listed in the table below) or is it some other tool
tag, or a custom tool tag?
|
||
>caption How to insert a new item in the grid | ||
* Arrange the Grid tools in a specific order; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a very exact order of steps, so I recommend switching to an ordered list. Unordered lists, especially in procedures, indicate that the steps can be performed in any sequence.
Closes: https://github.com/telerik/blazor/issues/10646