Column picker can't read visibility if DataGrid column has a variable for Title #1180

Closed
opened 2026-01-29 17:50:01 +00:00 by claunia · 2 comments
Owner

Originally created by @larow616 on GitHub (Apr 3, 2024).

Describe the bug
If a RadzenDataGridColumn has a Title set to a string variable vs hard-coded, the correct value of the variable is shown in the picker but it appears as unselected, even though the column is visible. Workaround is to explicitly set the Visibility of the column to true.

To Reproduce
Steps to reproduce the behavior:

  1. Create a datgrid and set AllowColumnPicking=true
  2. Create variable _myTitle and set it during Initialization of the razor component.
  3. Set column as follows:
  4. View column picker - value of _myTitle will show, but it is unchecked.
Originally created by @larow616 on GitHub (Apr 3, 2024). **Describe the bug** If a RadzenDataGridColumn has a Title set to a string variable vs hard-coded, the correct value of the variable is shown in the picker but it appears as unselected, even though the column is visible. Workaround is to explicitly set the Visibility of the column to true. **To Reproduce** Steps to reproduce the behavior: 1. Create a datgrid and set AllowColumnPicking=true 2. Create variable _myTitle and set it during Initialization of the razor component. 3. Set column as follows: <RadzenDataGridColumn Title="@_myTitle" Property="SomeProperty"></RadzenDataGridColumn> 4. View column picker - value of _myTitle will show, but it is unchecked.
Author
Owner

@enchev commented on GitHub (Apr 3, 2024):

Works well in our demo: https://blazor.radzen.com/datagrid-column-picker
image
image

column-picker-title

@enchev commented on GitHub (Apr 3, 2024): Works well in our demo: https://blazor.radzen.com/datagrid-column-picker ![image](https://github.com/radzenhq/radzen-blazor/assets/5804953/00103406-ffcc-4618-b789-b18caa6a3ef6) ![image](https://github.com/radzenhq/radzen-blazor/assets/5804953/06fd368e-4a37-4d77-8e3e-1c80f7a1e484) ![column-picker-title](https://github.com/radzenhq/radzen-blazor/assets/5804953/eecc78a1-b30d-4f6d-95c1-e076eed4f343)
Author
Owner

@larow616 commented on GitHub (Apr 3, 2024):

Ok - I didn't realize it is by design to explicitly set Visible when Title is a variable. Thanks for clarifying!

@larow616 commented on GitHub (Apr 3, 2024): Ok - I didn't realize it is by design to explicitly set Visible when Title is a variable. Thanks for clarifying!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1180