Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deselected filter items gone after filtering a second column #26

Closed
Rick6Star opened this issue Nov 22, 2018 · 3 comments
Closed

Deselected filter items gone after filtering a second column #26

Rick6Star opened this issue Nov 22, 2018 · 3 comments

Comments

@Rick6Star
Copy link

Hello,

I have an issue with the filters on the AdvancedDataGridView.
Using the sample, when I deselect "1 str" and "10 str" in the filter of the "string" column and click the "Filter" button. "1 str" and "10 str" are filtered out.
Opening the filter again I see the items "1 str" and "10 str" are deselected.
Now I deselect "0" in the "decimal" column and click the "Filter" button.
Re-opening the "decimal" filter will show the item "0" as deselected.
All oke so far.
Going back to "string" column filter "1 str" and "10 str" are gone.
I can not reselect them without resetting the column filter!

Any idea how to fix this?

@davidegironi
Copy link
Owner

Hello @Rick6Star, than you for your suggestion. This is just out it works. Filter are applied in order.
Taking your example in account, if you "Clear Filer", you can see that "1 str" and "10 str" are back again but not selected in "string" column.
It would be maybe a nicer behaviour if they stay there but not checked. I may implement this as soon as I have time, but for now this is the working behaviour of this component.
In the meanwhile, if you are going to fix it please do this as parametric, i mean as an EnableShowFilteredRecord enabler. This way one can chose between the current and the new behaviour.

@Rick6Star
Copy link
Author

@davidegironi thanks for your reaction. I understand why you did this.

I'll see if I can implement an EnableShowFilteredRecord enabler.
Do you have any sugestions that I have to take into account since I do not know your code?
When I have a working solution, I let you know.

@davidegironi
Copy link
Owner

Unluckly not, @Rick6Star I'm really sorry to not have time to build this, but I'm really busy those days (building a new house + main job extra work :-/).
Anyway try this (try alswo with the "text" search.
line 766 of AdvancedDataGridView.cs

-if (_filterOrderList.Count() > 0 && _filterOrderList.Last() == column.Name)
+if (_filterOrderList.Count() > 0 && _filterOrderList.Contains(column.Name))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants