The Prefilter feature serves two purposes. First, it enables ASPxPivotGrid to display a Filter Editor, allowing an end-user to apply filtering to the pivot grid's underlying data source at runtime. Second, you can filter the underlying data source in code, without displaying a Filter Editor to end-users.
The Filter Editor enables end-users to build complex filter criteria with an unlimited number of filter conditions, combined by logical operators. The resulting filter condition will be combined with the field-based filter criteria using the AND Boolean operator. The Filter Editor provides a set of logical operators that significantly simplify the process of creating filters for text, numeric and date-time fields.
End-users can invoke the Filter Editor at runtime via a context menu.
ASPxPivotGrid1.Prefilter.CriteriaString = "[" + fieldCategory.PrefilterColumnName + "] Like 'B%'";
ASPxPivotGrid1.Prefilter.CriteriaString = "[" + fieldCategory.PrefilterColumnName + "] Like 'B%'"
The Prefilter cannot filter data against data fields. If a data field is used in filter criteria that has been specified in code, an error message will be displayed within the Prefilter Panel. This message also appears if filter criteria contains a field name that does not exist. Use the PrefilterBase.State property to determine whether or not the filter criteria are valid.