How to remove duplicates in the FilterControl ~ Split from 194423

Hi,

sorry if I reopen this old post, but I noticed a problem occurs when I enable the property AllowFiltering on the column 'Month'. How can you see in the follow picture, when I open the Filter Popup, the month 'settembre' is showed two times because the records have two different date of 'scadenza' (03/09/2025 and 30/09/2025). Instead of 'ottobre' that correctly is showed one time because the two records have the same date.

Image_5100_1754322792756

I verified that the problem also occurs in your attached example of march 24th.

How can I solve the problem to show the month only one time?

Thanks in advance

Regards


1 Reply

RM Rabina Murugan Syncfusion Team August 5, 2025 04:09 PM UTC

Hi Maurizio,

We have investigated the reported scenario. By default, the filtering is applied based on the actual value of the column. However, your requirement to remove the duplicate items in the FilterControl can be achieved by setting the FilterMode as ColumnFilter.DisplayText. This ensure to filtering applied based on the DisplayText.


Code snippet to set FilterMode:


sfDataGrid1.Columns.Add(new GridDateTimeColumn()

{

    MappingName = "ShippingDate",

    Format = "MMMM",

    GroupMode = DataReflectionMode.Display,

    FilterMode = ColumnFilter.DisplayText

});


Image illustration of FilterControl:




Refer to the below user guide documentation for more information.

UG Link: Filtering based on DisplayText


Find the sample demo in the attachment.


Please let us know if you need any further assistance.


Regards,

Rabina M


If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.


Attachment: SfDataGrid_Filtering_8a037e29.zip

Loader.
Up arrow icon