Filter Control
- 2 minutes to read
The ASPxFilterControl is a stand-alone control that allows users to build filter criteria. It does not require SQL syntax and does not have limitations regarding the complexity of the filter conditions. With the ASPxFilterControl, you can construct multiple filter expressions, combined by any logical operator, and apply them to controls or to a data source.
The ASPxFilterControl offers the following features:
Rich end-user capabilities
See the following topic for more information: ASPxFilterControl: End-User Capabilities.
Appearance customization
The ASPxFilterControl allows you to customize the appearance of individual elements and manage the control’s appearance. Each style property has a number of attributes that allow you to customize element appearance. These attributes include: colors, fonts, borders, text attributes, and more.
Method Description Filter Control Styles. Group Type Gets the style settings that define the combining operator appearance. Filter Control Styles. Image Button Gets the style settings that define the add and remove buttons appearance. Filter Control Styles. Operation Gets the style settings that define the comparison operator appearance. Filter Control Styles. Property Name Gets the style settings that define the field name appearance. Filter Control Styles. Table Gets the style settings that define the filter area appearance. Filter Control Styles. Value Gets the style settings that define the criteria value appearance. Expression Validation
Use the IsFilterExpressionValid method to validate the filter expression. This method is available on both the client and server sides. This method checks whether end users entered all the required criteria values.
You can define validation settings for each column separately. See the following help topic to learn more: Validation.
Full-featured client-side API
The ASPxClientFilterControl object is the client-side equivalent of ASPxFilterControl. This object exposes the control’s comprehensive client-side API.
Use the following methods to work with editor values.
Method Description ASPx Client Filter Control. Apply Applies a filter constructed by an end-user. ASPx Client Filter Control. Get Applied Filter Expression Returns the applied filter expression. ASPx Client Filter Control. Get Editor Returns the editor used to edit the specified values. ASPx Client Filter Control. Get Filter Expression Returns the filter expression. ASPx Client Filter Control. Is Filter Expression Valid Returns a value indicating whether the filter expression being currently composed on the client side is valid - all expression conditions are filled. ASPx Client Filter Control. Reset Resets the current filter expression to a previously applied filter expression.