RadzenDataGrid: When using Save/Load settings and LoadData, the data is loaded twice #940

Closed
opened 2026-01-29 17:46:39 +00:00 by claunia · 1 comment
Owner

Originally created by @rudolfdeschipper on GitHub (Jul 26, 2023).

When you implement the Save/Load settings in the data grid, with LoadData, each time you press a sort column or a use a filter condition, the grid loads twice. This already happens when first loading the grid: it seems that first the data is loaded without the settings being applied, then it is loaded again with the settings applied.

If you run the sample on https://blazor.radzen.com/datagrid-save-settings-loaddata, it is already noticeable (the wheely runs twice with a small period in between).

Expected behavior
It is unnecessary to load the data twice, the settings should be applied on the first call to LoadData

Desktop (please complete the following information):

  • OS: any
  • Browser any
  • Version : latest

Additional context
A code sample on how to avoid this behavior would be sufficient as solution.

Originally created by @rudolfdeschipper on GitHub (Jul 26, 2023). When you implement the Save/Load settings in the data grid, with LoadData, each time you press a sort column or a use a filter condition, the grid loads twice. This already happens when first loading the grid: it seems that first the data is loaded without the settings being applied, then it is loaded again with the settings applied. If you run the sample on https://blazor.radzen.com/datagrid-save-settings-loaddata, it is already noticeable (the wheely runs twice with a small period in between). **Expected behavior** It is unnecessary to load the data twice, the settings should be applied on the first call to LoadData **Desktop (please complete the following information):** - OS: any - Browser any - Version : latest **Additional context** A code sample on how to avoid this behavior would be sufficient as solution.
Author
Owner

@enchev commented on GitHub (Jul 26, 2023):

There is no way to load the settings before loading the data. I’m afraid we cannot do much to avoid the current behavior:

  • DataGrid is bound and rendered
  • Settings are loaded and the DataGrid is reloaded according to the loaded settings.
@enchev commented on GitHub (Jul 26, 2023): There is no way to load the settings before loading the data. I’m afraid we cannot do much to avoid the current behavior: - DataGrid is bound and rendered - Settings are loaded and the DataGrid is reloaded according to the loaded settings.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#940