Count of filters and sorts

How would someone found out from DataGrid if there are any filters or sorts currently applied? Idealy count of both... I would like to show 2 buttons by the grid for clearing all filters and all sorts, but only if there are any...

You can use LoadData event:

Thanks, that works. Following question though, removing all filters works by using:

foreach(RadzenDataGridColumn<T> column in grid.ColumnsCollection)
	column.ClearFilters();

await grid.Reload();

but I'm having hard time to do the same for sorts, there is no ClearSort() method and when i do:

grid?.Sorts.Clear();
await grid.Reload();

grid will reload, visual indication of sortings are gone, but data are still sorted and i can see in LoadDataArgs that indeed there still are sorts present.

Maybe you can use Reset() method instead.

That would work, but not independently, that would clear both filters and sorts at the same time.

I've tried different approaches but unlike filters there seems to be no way to remove sorts from grid's internal state programatically. If i do grid.Sorts.Clear() and in next LoadData event clear the sorts manually on LoadData after that the sorting is still there.

If Reset() doesn't work for you feel free to propose something different that works - we are open to pull requests.