How to Modify elements of Advanced Filter Popup UI

Hello!

So I am currently using a sfdatagrid to hold my data. I have a custom filtering logicf that I am implementing that will control the itemsource of the datagrid. The way my data is setup, the default filter behavior will not return anything back. The issue I am having is that I am overriding the filter changing event, but because I am not technically letting the event follow through, there is no predicates being added to the column, thus the icon on my column header will still show as "not filtered", and when I click the filters icon. The "Clear Filter" button is not active. Is there a way to directly control these components? I would like to make the filter look active even if there isn't any predicates that way they can clear the filter, and I can write custom logic for that clear filter button press. I am not sure if this is possible or not, or if I will just have to write my own custom filter popup. 


private void DataTableMain_FilterChangingAsync(object sender, GridFilterEventArgs e)

{

    var column = e.Column.MappingName;

    var filterValue = e.FilterPredicates;

    FilterController.ApplyFiltersAndHideRows(filterValue, column);\

    e.Handled = true;

}



Thanks!


2 Replies

SG Santhosh Govindasamy Syncfusion Team September 6, 2024 12:44 PM UTC

Hi Jacob,

Thank you for reaching out.


Based on the information provided, our understanding is that you require the Clear Filter button to be activated in the filter popup without adding any filter predicates. We would like to inform you that the Clear Filter button will be enabled only after applying filter conditions in the filter popup. This button is designed to clear the filter conditions and remove the filtered records from the view.


If your requirement involves customizing the filter, please refer to the KB link mentioned below. It will assist you in customizing the appearance of the GridFilterControl and AdvancedFilterControl.

https://support.syncfusion.com/kb/article/10425/how-to-customize-the-filter-and-advanced-filter-appearance-of-wpf-datagrid-sfdatagrid


If we have misunderstood your requirement, please share the exact details so we can proceed further. share the exact details of the purpose of enabling the Clear Filter button without applying filter predicates will be helpful for us to assist you effectively.

Thanks for your cooperation and we look forward your response.


Regards,
Santhosh.G



SG Santhosh Govindasamy Syncfusion Team September 6, 2024 12:44 PM UTC


Loader.
Up arrow icon