Closed justborg closed 4 years ago
Hello, No there is not such option to rebind grid at runtime.
Hi, Thanks for your quick reply.
One more question, is it possible to filter the result programmatically when using the standard adapter (not lazy loading) i.e. dataAdapter.Filter?
Thanks in advance :)
Only one possible solution is:
var dataAdapter = new CollectionTableDataAdapter<WeatherForecast>);
dataAdapter.Filter = w => w ...
This will be only working for first setup of grid.
@justborg Regarding your first question. You can always hack rebinding by destroying the grid and rebuilding it.
@if (dataAdapter != null) { <GridView ... ? /> }
...
dataAdapter = null;
StateHasChanged();
dataAdapter = new CollectionTableDataAdapter<...
Is there a way to rebind the grid? or change the data adapter at runtime?