MudDataGrid: Fix generated EditTemplates not inheriting their column's culture#11931
Merged
ScarletKuro merged 6 commits intoMudBlazor:devfrom Oct 3, 2025
Merged
Conversation
… MudDataGrid component
Contributor
There was a problem hiding this comment.
Code Review
This pull request correctly adds the Culture property to the automatically generated EditTemplates in MudDataGrid, ensuring they inherit the culture from their column. This aligns the behavior of edit templates with that of cell templates. The associated test changes are also appropriate. I've added a couple of minor suggestions to improve code formatting and consistency.
Comment on lines
298
to
305
| <MudTextField T="string" Label="@column.Title" Value="@cell._valueString" ValueChanged="@cell.StringValueChangedAsync" Margin="@Margin.Dense" | ||
| Required=column.Required Variant="@Variant.Outlined" Disabled="@(!column.Editable || ReadOnly)" Class="mt-4" /> | ||
| Required=column.Required Variant="@Variant.Outlined" Disabled="@(!column.Editable || ReadOnly)" Class="mt-4" Culture="@column.Culture" /> | ||
| } | ||
| else if (TypeIdentifier.IsNumber(propertyType)) | ||
| { | ||
| <MudNumericField T="double?" Label="@column.Title" Value="@cell._valueNumber" ValueChanged="@cell.NumberValueChangedAsync" Margin="@Margin.Dense" | ||
| Required=column.Required Variant="@Variant.Outlined" Disabled="@(!column.Editable || ReadOnly)" Class="mt-4" /> | ||
| Required=column.Required Variant="@Variant.Outlined" Disabled="@(!column.Editable || ReadOnly)" Class="mt-4" Culture="@column.Culture" /> | ||
| } |
Contributor
There was a problem hiding this comment.
| ValueChanged="@cell.NumberValueChangedAsync" | ||
| Margin="@Margin.Dense" Style="margin-top:0" | ||
| Required=column.Required Variant="@Variant.Text" Culture="@column.Culture"/> | ||
| Required=column.Required |
Contributor
There was a problem hiding this comment.
This was referenced Oct 3, 2025
ScarletKuro
approved these changes
Oct 3, 2025
This was referenced Nov 5, 2025
Closed
This was referenced Dec 22, 2025
This was referenced Jan 3, 2026
This was referenced Jan 11, 2026
Closed
This was referenced Feb 5, 2026
Closed
This was referenced Feb 16, 2026
This was referenced Feb 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR makes the automatically generated EditTemplates inherit their enclosing Columns' Culture. This behaviour would mirror the automatically generated CellTemplates as they already inherit the Culture of the columns they are defined in.
Type of Changes
Checklist
dev).