RadzenDataGrid loses state of visible columns upon refresh #1139

Closed
opened 2026-01-29 17:49:29 +00:00 by claunia · 3 comments
Owner

Originally created by @leetheman on GitHub (Feb 27, 2024).

Hi, simple one to reproduce here:

  1. Create a Radzengrid, allow column picker
  2. Wire the datasource up to a List or IEnumerable
  3. Create a method to "refresh" which sets the List/Ienumerable to a new datasource (e.g. to simulate refreshing an EFCore Query)
  4. Run the project, hide some columns and click on refresh - the hidden columns will be shown.

Telerik does not have this issue but I prefer your grids.

This happens if I set my datasource to = a new data source, or an empty collection, or if even clear it (so the reference is still the same)

Please see GIF attached

Animation

Originally created by @leetheman on GitHub (Feb 27, 2024). Hi, simple one to reproduce here: 1. Create a Radzengrid, allow column picker 2. Wire the datasource up to a List or IEnumerable 3. Create a method to "refresh" which sets the List/Ienumerable to a new datasource (e.g. to simulate refreshing an EFCore Query) 4. Run the project, hide some columns and click on refresh - the hidden columns will be shown. Telerik does not have this issue but I prefer your grids. This happens if I set my datasource to = a new data source, or an empty collection, or if even clear it (so the reference is still the same) Please see GIF attached ![Animation](https://github.com/radzenhq/radzen-blazor/assets/37432015/07baca4e-9b13-4d69-b34c-516689edbd8c)
Author
Owner

@enchev commented on GitHub (Feb 27, 2024):

Setting new data will reset everything - this is by design

@enchev commented on GitHub (Feb 27, 2024): Setting new data will reset everything - this is by design
Author
Owner

@leetheman commented on GitHub (Feb 27, 2024):

OK, I don't get the logic - if it's bound to a SQL table, and records are added to that table, why should the columns be reset?

Nothing else gets reset - the sorting/filtering remains the same. So this is consistent grid state behaviour

@leetheman commented on GitHub (Feb 27, 2024): OK, I don't get the logic - if it's bound to a SQL table, and records are added to that table, why should the columns be reset? Nothing else gets reset - the sorting/filtering remains the same. So this is consistent grid state behaviour
Author
Owner

@leetheman commented on GitHub (Mar 22, 2024):

Thanks for fixing this!

@leetheman commented on GitHub (Mar 22, 2024): Thanks for fixing this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1139