Change ShowFilterRow in DevExpress Blazor DxGrid

208 views Asked by At

I am writing to ask how to change the DxGrid ShowFilterRow - I would like to have a button (the best would be near page size or page number selectors) which would show/hide the row with filters.

I tried to add a button and handle click in razor but when I change the property I am getting Invalid operation exception.

1

There are 1 answers

0
sadahtay On

Which property are you trying to change? It should work find the way you describe:

<DxButton Click="toggleGridFilter" />
<DxGrid ShowFilterRow=@_showFilterRow>
</DxGrid>

@code {
    private bool _showFilterRow = true;

    private void toggleGridFilter()
    {
        _showFilterRow = !_showFilterRow;
    }
}