[PR #882] Reset DataGrid in Settings.set #2377

Open
opened 2026-01-29 18:18:33 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/radzenhq/radzen-blazor/pull/882

State: closed
Merged: No


Currently the DataGrid Settings are only reset if the Settings property is called with null. If an application is developed with multiple DataGridSettings that can be saved and loaded, any secondary set is loaded in addition to the first for column sorting.

This branch resets the DataGrid each time the Settings setter is called prior to the updated value being applied and Reload being called meaning the new Settings will be applied from fresh.

As highlighted by enchev in my first pull request, this caused a loop issue in the LoadData Demo. The DataGridSettings were being deserialized and loaded on every OnAfterRenderAsync once Data has been loaded. This only needs to happen on firstRender to avoid continual loop.

I also noted that the Reload button was targeting the IQueryable page.

**Original Pull Request:** https://github.com/radzenhq/radzen-blazor/pull/882 **State:** closed **Merged:** No --- Currently the DataGrid Settings are only reset if the Settings property is called with null. If an application is developed with multiple DataGridSettings that can be saved and loaded, any secondary set is loaded in addition to the first for column sorting. This branch resets the DataGrid each time the Settings setter is called prior to the updated value being applied and Reload being called meaning the new Settings will be applied from fresh. As highlighted by **enchev** in my first pull request, this caused a loop issue in the [LoadData Demo](https://blazor.radzen.com/datagrid-save-settings-loaddata). The `DataGridSettings` were being deserialized and loaded on every `OnAfterRenderAsync` once Data has been `loaded`. This only needs to happen on `firstRender` to avoid continual loop. I also noted that the Reload button was targeting the IQueryable page.
claunia added the pull-request label 2026-01-29 18:18:33 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#2377