RadzenDataGrid AllowColumnPicking


I have a RadzenDataGrid which has around 15 columns and am using the AllowColumnPicking option to allow the user to specify which columns they'd like to see, and which should be hidden. This is working perfectly across all columns.

I would like to allow the user to save their column selections to BrowserStorage, so the next time they're on their desktop (with a large monitor) they can see all the columns, but when they're on their tablet, they have THEIR cut-down selection of columns.

I can now save the selections to BrowserStorage, reopen that selection and apply the values to the Visible property against each included column.

The thing I'm having trouble with is when the, "Save to BrowserStorage" can happen; there doesn't seem to be an event that fires when a column is hidden/shown? I've tried calling a function OnRender of the grid (when FirstRender is false), which loops through each RadzenDataGridColumn within the RadzenDataGrid, but the Visible property seems to have it's initial value, rather than the new value after checking/clearing the column from within the ColumnPicker dropdown.

I'll try to explain that last bit again, if I have a column whose Visible property is set to true, then deselect the column from within the column picker dropdown, I would expect the Visible property for that column to now be false; however, it still reads as true.

Is there a way to accomplish what I'm looking for here? Could an event be created for when a column switches from Visible="true" to Visible="false"? That way I could simply save the user's selection as the column is picked (or not). If not an event, could the Visible property respect the column picker's selection?

With either of those things working, I think I could finish this piece of work. I'd prefer an event to fire when the Column Pickers selection changes, as Render fires more frequently than I'd like for this task.

Of course, my approach could be all wrong and you may already have a way of doing this, please let me know.


Hi @SimonKidd,

Indeed your scenario would require RadzenDataGrid to fire events when the user hides or shows a column via the column picker. Feel free to open a feature request here!

Hi @SimonKidd,

Check this thread for more info on how to get column visible property that is changed runtime: