Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

xristianstefanov
Copy link
Contributor

@xristianstefanov xristianstefanov self-assigned this Jan 15, 2025
@xristianstefanov xristianstefanov requested review from a team as code owners January 15, 2025 16:03
components/grid/toolbar.md Outdated Show resolved Hide resolved
components/grid/toolbar.md Outdated Show resolved Hide resolved
components/grid/toolbar.md Outdated Show resolved Hide resolved
components/grid/toolbar.md Outdated Show resolved Hide resolved
components/grid/toolbar.md Outdated Show resolved Hide resolved

## 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).
Copy link
Contributor

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
Copy link
Contributor

@dimodi dimodi Jan 16, 2025

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.

Copy link
Contributor

@ikoevska ikoevska left a 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
Copy link
Contributor

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.

Suggested change
## 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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).
Copy link
Contributor

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;
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants