Are you sure using the data bound mode?
I've just tested your code.
Have few modifications for it to work.
Using the following data:
DataTable data = new DataTable();
data.Columns.Add(\"col1\", typeof(DateTime));
data.Rows.Add(new DateTime(2007, 12, 12));
data.Rows.Add(new DateTime(2005, 12, 12));
data.Rows.Add(new DateTime(1995, 12, 12));
flyGrid1.Rows.DataSource = data;
And the following filter function (is almost same as yours):
filterList.Clear();
filterList.Add(new FilterHelper(\"[All]\", FilterMode.All));
filterList.Add(new FilterHelper(\"[Custom]\", FilterMode.Custom));
List dates = new List();
foreach (NodeBase node in flyGrid1.Rows.Items)
{
object cellValue = node.GetCellValue(0);
if (cellValue != null)
{
DateTime date = ((DateTime)cellValue).Date;
if (!dates.Contains(date))
{
dates.Add(date);
filterList.Add(new FilterHelper(date.ToShortDateString(),
new FilterItem[]
{
new FilterItem(date , FilterOperator.And, ConditionOperator.GreaterThanOrEqual),
new FilterItem(date.AddDays(1), FilterOperator.And, ConditionOperator.LessThan)
}));
}
}
}
And everything works as it should.