Setting Parameter on RadzenDataGridColumn<T> does not always trigger render of content #1805

Open
opened 2026-01-29 17:58:49 +00:00 by claunia · 0 comments
Owner

Originally created by @Anspitzen on GitHub (Jul 10, 2025).

Describe the bug
Setting one of the available Parameters on the RadzenDataGridColumn Component does not always trigger a re-render do reflect it in the contents.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Demo Page
  2. Edit Source to:
<RadzenDropDown Data="@(Enum.GetValues(typeof(SortOrder)).Cast<Enum>())" @bind-Value=@SortOrder AllowClear=true />
<RadzenDataGrid @ref="grid" Data=@employees AllowSorting="true">
    <Columns>
        <RadzenDataGridColumn Property="ID" Title="ID" SortOrder="@SortOrder" />
    </Columns>
</RadzenDataGrid>

@code {
    RadzenDataGrid<Employee> grid;
    SortOrder? SortOrder { get; set; }
    List<string> companyNames = new List<string> {"Vins et alcools Chevalier", "Toms Spezialitäten", "Hanari Carnes", "Richter Supermarkt", "Wellington Importadora", "Centro comercial Moctezuma" };
    
    public class Employee
    {
        public int ID { get; set; }
        public string CompanyName { get; set; }
    }

    IEnumerable<Employee> employees; 

    protected override async Task OnInitializedAsync()
    {
        employees = await Task.FromResult(Enumerable.Range(0, 60).Select(i =>
            new Employee
            {
                ID = i,
                CompanyName = companyNames[i % 6],
            }).AsQueryable());
    }
}
  1. Select sorting Desc in the dropdown above grid
  2. Sorting Arrow on colum is displayed correctly, but not yet sortet
  3. Clear or select Asc on dropdown, now it refreshs the Grid to the previous Desc sorting
  4. Now any other selection (Asc/Null/Desc) does not change sorting anymore, only the indicator arrow gets changed correctly

Desktop (please complete the following information):

  • Browser chrome

Additional context
It seems like a mix between #2214 for lag one render behind when setting the parameter and reload grid (this here is intern call, not triggered from external but seems like same function)
And second part as a Problem on triggering the Reload at all when it is a (possible) default value for the Parameter (Null/ 0 for Enum?)

Originally created by @Anspitzen on GitHub (Jul 10, 2025). **Describe the bug** Setting one of the available Parameters on the RadzenDataGridColumn Component does not always trigger a re-render do reflect it in the contents. **To Reproduce** Steps to reproduce the behavior: 1. Go to Demo Page 2. Edit Source to: ``` <RadzenDropDown Data="@(Enum.GetValues(typeof(SortOrder)).Cast<Enum>())" @bind-Value=@SortOrder AllowClear=true /> <RadzenDataGrid @ref="grid" Data=@employees AllowSorting="true"> <Columns> <RadzenDataGridColumn Property="ID" Title="ID" SortOrder="@SortOrder" /> </Columns> </RadzenDataGrid> @code { RadzenDataGrid<Employee> grid; SortOrder? SortOrder { get; set; } List<string> companyNames = new List<string> {"Vins et alcools Chevalier", "Toms Spezialitäten", "Hanari Carnes", "Richter Supermarkt", "Wellington Importadora", "Centro comercial Moctezuma" }; public class Employee { public int ID { get; set; } public string CompanyName { get; set; } } IEnumerable<Employee> employees; protected override async Task OnInitializedAsync() { employees = await Task.FromResult(Enumerable.Range(0, 60).Select(i => new Employee { ID = i, CompanyName = companyNames[i % 6], }).AsQueryable()); } } ``` 4. Select sorting Desc in the dropdown above grid 5. Sorting Arrow on colum is displayed correctly, but not yet sortet 6. Clear or select Asc on dropdown, now it refreshs the Grid to the previous Desc sorting 7. Now any other selection (Asc/Null/Desc) does not change sorting anymore, only the indicator arrow gets changed correctly **Desktop (please complete the following information):** - Browser chrome **Additional context** It seems like a mix between #2214 for lag one render behind when setting the parameter and reload grid (this here is intern call, not triggered from external but seems like same function) And second part as a Problem on triggering the Reload at all when it is a (possible) default value for the Parameter (Null/ 0 for Enum?)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1805