Skip to main content
A newer version of this page is available. .

Incremental Filtering

  • 3 minutes to read

The ASPxGridLookup editor enables end-users to filter built-in ASPxGridView rows dynamically, based upon the text typed into the editor’s input box on the client side (find-as-you-type filtering). The following filter modes are available, controlled by the ASPxGridLookup.IncrementalFilteringMode property.

  • None

    Filtering is not applied to the editor’s list items (grid rows).

    In this mode, only the native filtering of the built-in ASPxGridView control can be used within the dropdown by enabling the GridLookup.GridViewProperties.Settings.ShowFilterRow (ASPxGridViewSettings.ShowFilterRow) property.

  • StartsWith

    A list item (grid row) satisfies the filtering, only if the text of its specific data field(s) begins with the entered search string (particular fields, their order and a field value separator symbol can be defined via the ASPxGridLookup.TextFormatString property). This mode provides the autocomplete feature.

    The following image illustrates the ‘StartsWith‘ filter in action: the “ana cha“ search string is manually entered into the edit box, and the TextFormatString property is set to “{0} {1}” (this specifies that the “First Name” column should be searched for “ana“ entries, and the “Last Name” column should be searched for “cha“ entries).

    ASPxGridLookup-IncrementalFiltering-StartsWith.png

  • Contains

    The editor’s dropdown list is filtered for list items (grid rows) that contain the entered search string(s). In this mode, if the entered text does not contain separator symbols (the default separator is a blank space), it is interpreted as a single search string; otherwise, the text splits into parts - into separate search strings. To satisfy filtering criteria, a list item (grid row) should contain entries of all search strings within any of the data fields specified by the ASPxGridLookup.TextFormatString property (via this property, you can also define custom separator symbols).

    The following image illustrates the ‘Contains‘ filter in action: the “ana cha“ text is manually entered into the edit box (this specifies two separate search strings - “ana“ and “cha“), and the TextFormatString property is set to “{0} {1}” (this specifies that the “First Name” and “Last Name” columns should be searched for entries of the search strings).

    gridlookup-filtering.png

When the ASPxGridLookup editor is in an incremental filtering mode, the ASPxGridLookup.IncrementalFilteringDelay property can be used to define the time interval between the time a user starts typing within the editor’s edit box and the time filtering is applied.

Note

Incremental filtering requirements.

Incremental filtering requires that the multiple selection mode is disabled (i.e. the ASPxGridLookup.SelectionMode property is not set to Multiple).

Incremental filtering requires that the ASPxEdit.AutoPostBack (via ASPxGridLookup.AutoPostBack) property is set false.

Example

How to: Filtering with a Server Mode