MyGridView.Columns[MyGridView.GetColumnByFieldName('MY_DATE_FIELD').Index].OnGetFilterValues := cxGridGetFilterValues;
Then I put the following code in the procedure:
procedure MyFrm.cxGridGetFilterValues(Sender: TcxCustomGridTableItem; AValueList: TcxDataFilterValueList);
procedure DeleteFilterEntry(AValue: Variant);
begin
AValueList.Delete(AValueList.FindItemByKind(fviSpecial, AValue));
end;
begin
DeleteFilterEntry(foYesterday);
DeleteFilterEntry(foToday);
DeleteFilterEntry(foTomorrow);
DeleteFilterEntry(foNext14Days);
DeleteFilterEntry(foNext30Days);
end;
There are more filter options that could be removed, it just a matter of looking at the unit that contains the constants.
No comments:
Post a Comment