We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Excel Like Filtering Advance Filter's filter type drop down

Thread ID:

Created:

Updated:

Platform:

Replies:

116459 May 28,2014 12:58 AM Jun 2,2014 08:27 AM WPF 1
loading
Tags: SfDataGrid
Kevin Kuan
Asked On May 28, 2014 12:58 AM

Hi,

Can I know is there anyway i can populate the excel like filtering drop down with only the filter type I want.

Taking the example of Text Filters, there are Equals, Not Equals, BeginsWith, Contains, EndsWith, Empty, Not Empty, Null , Not Null.
How do i remove the empty, not empty, null and not null from the dropdown list?


Best Regard,
Kevin


Saravanan C [Syncfusion]
Replied On June 2, 2014 08:27 AM

Hi Kevin,

 

Thank you for contacting Syncfusion Support.

 

You can remove the null and not null filter types by setting the property AllowBlankFilter=”False” in grid column. Please refer the code sample in below:

 

Code Snippet[XAML]:

<syncfusion:SfDataGrid.Columns>

    <syncfusion:GridTextColumn MappingName="OrderID"

                               AllowBlankFilters="False"/>

</syncfusion:SfDataGrid.Columns>

 

And also if you want to remove the empty and not empty filter types from advanced text filtering, then you can achieve this by editing the control template for AdvancedFilterControl and changing the items source of the PART_MenuComboBox1 and PART_MenuComboBox2 with your items source. We have created the sample based on your requirement, please find the sample in the attachments.

 

Please let us know the provided solution helps you.

 

Thanks,

Saravanan C


Attachment: ExcelLikeFilteringDemo_81c49ac1.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;