Dennis Gundersen
Dennis Gundersen

Reputation: 73

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

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...

Upvotes: 0

Views: 818

Answers (1)

Dennis Gundersen
Dennis Gundersen

Reputation: 73

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

Upvotes: 1

Related Questions