How to hide/show columns in Blazor QuickGrid on breakpoints?

59 Views Asked by At

When using the regular Bootstrap 5 method in Blazor 8 by adding Class="d-sm-none d-md-block" to a QuickGrid component's PropertyColumn in order to hide it on small screens, the Bootstrap class overwrites something in QuickGrid's CSS (I think), as the edited property is now stacked vertically instead of horizontally.

<PropertyColumn Property="@(p => p.BrokerName)" Title="Broker" Sortable="true" Class="d-sm-none d-md-block" />
<PropertyColumn Property="@(p => p.Symbol)" Title="Symbol" Sortable="true" Class="d-sm-none d-md-block" />

This puts Symbol underneath BrokerName instead og to the right of it.

Is there some special trick to hiding PropertyColumns in QuickGrid that doesn't collide with Bootstrap? Not too keen on making my own media queries...

TIA!

Dennis

1

There are 1 best solutions below

0
On

Oops!! It turns out that Class="d-none d-md-table-cell" works just fine, if you spell it correctly...

Sorry about that!

Re Dennis