Remove 'All' option from Column Picker

Is it possible to remove the "All" option from the DataGrid column picker?

image

There is no property for that however you can use CSS. Check what is the selector using browser developer tools.

UPDATE: We've added AllowSelectAll property for the ListBox/DropDown component and AllowPickAllColumns for the DataGrid to control this - it will be part of our next update before the end of the week.

1 Like

That's great, I really love how quickly you guys move on pushing out updates, keep up the good work!

I just noticed a bug with selecting the All option, when clicking it I get this exception in the browser console, this only started happening after I updated to v4.1.4.

This is happening on all of my DataGrid pages loading various tables.

Exception:

System.InvalidCastException: Unable to cast object of type 'System.Linq.EnumerableQuery`1[System.Object]' to type 'System.Collections.Generic.IEnumerable`1[Radzen.Blazor.RadzenDataGridColumn`1[Data.TblTransaction]]'.
   at Radzen.Blazor.RadzenDataGrid`1.UpdatePickableColumn(RadzenDataGridColumn`1 column, Boolean visible)
   at Radzen.Blazor.RadzenDataGrid`1.ToggleColumns()
   at Microsoft.AspNetCore.Components.EventCallbackWorkItem.InvokeAsync[T](MulticastDelegate delegate, T arg)
   at Microsoft.AspNetCore.Components.ComponentBase.Microsoft.AspNetCore.Components.IHandleEvent.HandleEventAsync(EventCallbackWorkItem callback, Object arg)
   at Radzen.DropDownBase`1.SelectAll()
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

Already fixed and the fix will be published tomorrow!

1 Like

Amazing thank you for the quick reply!