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): Document breaking change in column template component usage #2620

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

dimodi
Copy link
Contributor

@dimodi dimodi commented Dec 9, 2024

No description provided.

@dimodi dimodi added the merge-to-production Use this label to get a comment to choose whether to merge the PR to production label Dec 9, 2024
@dimodi dimodi requested review from a team as code owners December 9, 2024 18:22
Copy link
Contributor

github-actions bot commented Dec 9, 2024

Hello @dimodi,

Check the below option if you would like to automatically generate PR to production. The automation uses the branch for the cherry-pick, and then will delete the branch. Please, do not delete it manually.

  • create PR to production

@dimodi dimodi merged commit 3d80e62 into master Dec 10, 2024
1 check passed
Copy link
Contributor

Here you are the link to your PR to production: 2624

@github-actions github-actions bot deleted the grid-template-change branch December 10, 2024 07:53
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.

Reviewed.


To define a column template, use a `<Template>` tag inside the `<GridColumn>` tag. The Grid uses the defined `Template` to show the "view" representation of all cells in that column. This also includes cells from [columns that are marked as `Editable="false"`]({%slug components/grid/columns/bound%}#data-operations), while the cells' parent row is in [inline edit mode]({%slug components/grid/editing/inline%}).

Visual Studio tends to autocomplete the `<Template>` tag with a lowercase `t` which breaks the template logic and does not allow you to access the `context`. Ensure the `Template` tag uses a capital `T`.
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 rather important note that needs more attention from the readers. I recommend applying an appropriate callout formatting style.

@@ -44,6 +44,40 @@ The obsolete `ClearButton` parameter is removed. Use `ShowClearButton` instead.
* The obsolete `AutoFitColumns()` method is removed. Use `AutoFitColumnsAsync()` instead.
* The obsolete `AutoFitAllColumns()` method is removed. Use `AutoFitAllColumnsAsync()` instead.
* When using [grouping and `OnRead`]({%slug components/grid/manual-operations%}#grouping-with-onread), casting `DataSourceResult.Data` to a list of objects (`.Cast<object>()`) is no longer needed.
* [Components in a Grid column `<Template>` require a `@key`]({%slug grid-templates-column%}#using-components-in-grid-column-templates) in order to display correct values after data operations like sorting, filtering, paging, and others.
Copy link
Contributor

Choose a reason for hiding this comment

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

You can almost always use just "to" instead of "in order to".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-to-production Use this label to get a comment to choose whether to merge the PR to production
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants