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
For Each fc As FilterCondition In cl.FilterConditions
Hi Terri,
I tested “clearing filter conditions” functionality in 14.2 and it is working as expected. AfterRowFilterChanged event is called for each column and every time it clears the first filter condition on the Grid filters list. So by clicking on “Click here to clear all filter criteria” you are calling AfterRowFilterChanged event for each of your column and thus clearing all the column’s filter conditions one at a time.
Please let me know if you have any questions.
Sincerely,Sahaja KokkalagaddaAssociate Software Developer, Windows Formshttp://www.infragistics.com/
Thanks for the reply, but actually, this is not what I would expect on a row-level event like the AfterRowFilterChanged event.
There should be an object that contains all the column filters. When the user clicks "Clear All Filter Criteria", then this object should not contain any filters. The problem is, that it DOES contain filters. Your suggested solution will not work because if there were previously 10 filtered columns, the user clicks the "Clear All Filters", my code would then be querying the database 9 times in a row, one for each column being cleared. Please ask your development team to provide an object that contains all the filters in one fell swoop. thank you.
I’m going to create a case for this issue and I will work with you privately. To give it attention, I'm going to log this behavior in our internal tracking system. Once I log this issue I will send its development Id as an update. You can view the status of the development issue connected to this case by selecting the "Development Issues" tab when viewing this case on the web site.
Please let me know if you need more information.
I created case CAS-172934-W4S3C8 for this issue. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 219401. The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution.
I will leave this case open and update you with any new information after the review. You can also continue to send updates to this case at any time.
You can view the status of the development issue connected to this case by selecting the "Development Issues" tab when viewing this case on the web site.