Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
150
Clear All Filter Criteria is not clearing all FilterConditions
posted

I have code to capture filter conditions, and I re-run the query and re-load the grid (I do this to limit the number of records returned from the database, for performance reasons). This is all working great. However, when you click the little button on the far left corner of the grid to "Click here to clear all filter criteria", it's only clearing out the first Filter Condition. So if there are multiple columns on which the user put a filter, it's only removing the first one from the e.Rows.ColumnFilters. My code is in the AfterRowFilterChanged event. I'm using VB.Net, infragistics version 14.2.

Here's a stripped down snippet of my code: (in the AfterRowFilterChanged event)

Dim grdFilters As Infragistics.Win.UltraWinGrid.ColumnFiltersCollection

Dim sValue as Object = Nothing

 grdFilters = e.Rows.ColumnFilters

 For Each cl As ColumnFilter In grdFilters

       For Each fc As FilterCondition In ht.FilterConditions

          sValue = fc.CompareValue


            ' When "Clear All Filters" is clicked it should never reach this point, but it does (when there was previously more than one column being filtered on).

         Next fc

Next cl


How can I capture the fact that the user clicked the "Click here to clear all Filter Criteria"?