Hello,
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.Clear();
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 });
}
}
Regards