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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to make a custom filter on month ?

Thread ID:





127121 Oct 27,2016 08:43 AM UTC Feb 17,2017 01:06 PM UTC WinRT 3
Tags: SfDataGrid
Asked On October 27, 2016 08:43 AM UTC


I have a GridDateTimeColumn I want to make a custom Filter, which I can filter on the month's date.
On the filter, we see "January, February..."

How to make this, please ?

I made this, but I failed to filter the items.

 void sfDataGrid_FilterItemsPopulated(object sender, GridFilterItemsPopulatedEventArgs e)
            if (e.Column.MappingName == "ShippedDate")
                var itemsSource = e.ItemsSource as List<FilterElement>;
                itemsSource.Add(new FilterElement { ActualValue = new DateTime(2000, 1, 1), DisplayText = "January", IsSelected = true });
                itemsSource.Add(new FilterElement { ActualValue = new DateTime(2000, 2, 1), DisplayText = "February", IsSelected = true });
                itemsSource.Add(new FilterElement { ActualValue = new DateTime(2000, 3, 1), DisplayText = "March", IsSelected = true });


Sivakumar R [Syncfusion]
Replied On October 28, 2016 04:51 PM UTC

Hi Elie, 
We have prepared the sample to filter based on month and year. Please find the sample from below location, 

Replied On February 16, 2017 02:01 PM UTC

Hi guys,

when I run the sample, it doesn't work.
FilterControl's items are well formatted (ie: "March 2009") but when I filter, no more value is displayed on the grid...

So filter items are good but the filtering method doesn't work anymore (see images).
Any idea ?
thanks, Julien

selecting filter

after filter

Jai Ganesh S [Syncfusion]
Replied On February 17, 2017 01:06 PM UTC

Hi Elie,  
The attached sample working fine and also the filtering also working as expected in our side, 
Could you please check this in your side and please share in which essential studio you have used in your application? This would be more helpful for us to analyze further. 
Jai Ganesh S 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon