I have a radgridview and a Command to save changes to that view on a button next to it
When I save I want to clear any filters on this RadGridView
So in my Command I fire this in my UI thread when I am done
I also tried
but nothing seems to work, the lines aint filtered, but the filter button still shows the filtered state, and if I click on the filter icon, any settings I had before are still set.
9 Answers, 1 is accepted
I tried reproducing such behavior on my side, however I was not able to. When calling the ClearFilters() method of each column, the FilteringControl and the Filtering funnel are updated as expected.
Please find attached a sample application as a demonstration. Am I missing something?
I use this custom filter, maybe thats why
I miss an edit feature...
When I run the
Then the OnClear in my custom filter is NOT run, if I click my button that runs that code, then it works fine, but I cant get to run that code from "outside" the filter (Like where I am trying to do it from)
As the scenario you describe seems pretty specific and based on the code provided it is hard for us to identify the root of the issue, would it be possible to provide us with a sample project that reflects your setup so we can debug it and investigate further? The following blog post should be of help - Isolating a Problem in a Sample Project. If more convenient for you, simply modify the project sent by my colleague.
Added my custom filter to your sample project,
Add filter to establised year, click button 1, nothing happens
Cant use your upload feature with my 38kb file (No image files) http://www.filedropper.com/cleargridviewfilters
You can expose a clear method in your custom filter and call it in case the filtering control of the column is of the custom type. The logic in the method should be the same as the one in the "OnClear()" method:
Eventually, you can perform the filtering as follows: