Feature request: Saving and resetting filters
See original GitHub issueHi all,
I am working on a project, where it would be nice to save the filters that are currently selected. I can then save and load filter presets, which is nice to have in certain use-cases.
Currently, it was easy to get the filters by creating a public property for the criteria list. But when I try to set the criteria list again. It is not updating all the filters and the view again. Can anybody help me with this implementation?
Currently, I edited something like this in the Filterdatagrid.cs
:
public Dictionary<string, Predicate<object>> Filters
{
get => criteria;
set
{
// reset criteria List
criteria.Clear();
GlobalFilterList.Clear();
criteria = value;
CollectionViewSource = System.Windows.Data.CollectionViewSource.GetDefaultView(ItemsSource);
if (CollectionViewSource.CanFilter) CollectionViewSource.Filter = Filter;
CollectionViewSource.Refresh();
OnPropertyChanged(nameof(Filters));
}
}
I can get the filters by requesting FilterDataGrid.Filters
, but when setting, it will not work.
Issue Analytics
- State:
- Created 5 months ago
- Reactions:2
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How to Reset All Filters in Power BI
Resetting filters is a simple yet powerful feature that can save you time and ensure that your data is always presented accurately.
Read more >Filters on Beta Dashboard resetting
I often have a problem with Beta Dashboards where I would edit a filter for the dashboard but the changes do not get...
Read more >Solved: How can a customer save a filter for future use in...
Hello! I'm looking for a solution that allows a customer to filter requests in the customer portal, and save this filter for future...
Read more >Filter and/or Search Feature Enhancements
If the search function is robust, it may remove the need for the filter request as the search function would be sufficient.
Read more >How-to Add Button to Reset Filters to Default (Video Tip)
File a feature request with our support team for another alternative. Tell your users that their requests are not important to you. This...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can contirbute this
Hi
How it works ? If it works it may be useful for other users and I will integrate this new feature