The build in filtering features of RadGrid are great in most cases, but there is still room for improvements I feel. One are is what happens after you filter, if you want to do multiple searches (filterings) after one another, which are not related to each other (like in a Customer Telephone support). This means that the customer service rep would have to manually clear the filters in order to be able to search for something else. This is especially tricky if you have enabled the AutoPostBackOnFilter which means that when you clear the previous filter, and moves to another filter, a select for EVERYTHING will be executed (as there now is no filter).
As far as I know, there is no "ClearFilterAfterSelect" option on the RadGrid, which could be a solution to this problem. The idea would of course be to clear (reset) the filters after a search/filter has been completed. What we have done is to implement this ourselves as:
foreach (GridColumn column in radGrid.MasterTableView.Columns)
{
column.CurrentFilterFunction = GridKnownFunction.NoFilter;
column.CurrentFilterValue = string.Empty;
}
radGrid.MasterTableView.FilterExpression = string.Empty;
after the Select has been executed, but it would be nice to have this option. Or perhaps it already exists?
Also, it would be interesting to know if there are any drawbacks to this (besides having to fill in filter data again of course)?
As far as I know, there is no "ClearFilterAfterSelect" option on the RadGrid, which could be a solution to this problem. The idea would of course be to clear (reset) the filters after a search/filter has been completed. What we have done is to implement this ourselves as:
foreach (GridColumn column in radGrid.MasterTableView.Columns)
{
column.CurrentFilterFunction = GridKnownFunction.NoFilter;
column.CurrentFilterValue = string.Empty;
}
radGrid.MasterTableView.FilterExpression = string.Empty;
after the Select has been executed, but it would be nice to have this option. Or perhaps it already exists?
Also, it would be interesting to know if there are any drawbacks to this (besides having to fill in filter data again of course)?