Hi, I'm having an issue in my blazor wasm app. I'm using a page property to use as filter value for one of my columns in a datagrid. I put a value to that property in my Page Load event, and I can see that value in the appropriate column filter, but the datagrid doesn't do the filter, just shows that value, and I have to manually click the "Apply" button in my column filter UI. How can I apply that filter to the datagrid automatically when the grid is loaded?
Also important, the property I'm using is a Nullable DateTime, as the column that I want to filter is a DateTime column, and I'm using the GreaterThanOrEquals comparison in the filter.
Hi @bringmyoffice,
You can use the approach from this article:
I've made for you small example app:
https://drive.google.com/file/d/1eqjWHcfhv-AWZuCnwt7-71cv6fbw0VJC/view?usp=sharing
Initial value is set on PageLoad:
FilterValue is assigned as illustrated in the article:
The DataGrid is hinted that the filtering will be OData by assigning empty ODataEnumerable initially:
This is needed since LoadData will come later in the lifecycle and the grid will not know that OData filter expressions should be used.
The result: