I have a Grid with AllowFilteringByColumn set to true. Each column in the grid has the filer textbox plus the drop down list of search options. The CurrentFilterFunction is set to 'Contains' and Autopostback is set to true. So users can enter a value and press enter which will do a 'contains' search on that column.
However there are two things that users keep trying to do that cause odd behaviour.
- They will enter a filter value in the FirstName column, then enter a value in the LastName column and press enter. Since enter is pressed while focus is on the LastName column, only that column is filtered and the FirstName filter disappears.
- The second scenario is that they will do a filter on FirstName and press enter, then after viewing the results will delete the filter on FirstName and then type a filter into LastName and press enter. When you do this the lastName filter is applied but the FirstName filter isn't checked so it reappears.
Is there a way to do multiple filters at once? I'm trying to handle the OnItemCommand event for the grid, then go through each column to see if there is a value in the textbox and then apply the filter manually there. However I'm stuck on how to generate the FilterExpression and how to check the which search option is selected (contains, startswith etc...)
Is this the correct direction or is there a better way to do this?
However there are two things that users keep trying to do that cause odd behaviour.
- They will enter a filter value in the FirstName column, then enter a value in the LastName column and press enter. Since enter is pressed while focus is on the LastName column, only that column is filtered and the FirstName filter disappears.
- The second scenario is that they will do a filter on FirstName and press enter, then after viewing the results will delete the filter on FirstName and then type a filter into LastName and press enter. When you do this the lastName filter is applied but the FirstName filter isn't checked so it reappears.
Is there a way to do multiple filters at once? I'm trying to handle the OnItemCommand event for the grid, then go through each column to see if there is a value in the textbox and then apply the filter manually there. However I'm stuck on how to generate the FilterExpression and how to check the which search option is selected (contains, startswith etc...)
Is this the correct direction or is there a better way to do this?