Skip to main content
Tab

ASPxAutoCompleteBoxBase.IncrementalFilteringMode Property

Specifies the incremental filter mode.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(IncrementalFilteringMode.Contains)]
public virtual IncrementalFilteringMode IncrementalFilteringMode { get; set; }

Property Value

Type Default Description
IncrementalFilteringMode Contains

A value of the enumeration.

Available values:

Name Description
Contains

The editor filters items that contain the filter string.

StartsWith

The editor filters items that begin with the filter string.

None

The editor does not filter items.

Remarks

The editor can filter items on the client while a user types the filter string. Use the IncrementalFilteringMode property to specify the editor’s filter mode.

  • IncrementalFilteringMode=”Contains”

    ComboBox-IncrementalFilteringMode

  • IncrementalFilteringMode=”StartsWith”

    ComboBox-IncrementalFilteringMode-StartsWith

The editor can use callbacks in incremental filter mode.

In markup:

<dx:ASPxComboBox ID="Countries" runat="server" EnableCallbackMode="True" IncrementalFilteringMode="StartsWith">
    <Items>
        <!--...-->
    </Items>
</dx:ASPxComboBox>

In code:

protected void Page_Load(object sender, EventArgs e){
    ASPxComboBox cb = new ASPxComboBox();
    cb.Items.AddRange(new List<ListEditItem>(){
        //...
    })
    cb.EnableCallbackMode = true;
    cb.IncrementalFilteringMode = IncrementalFilteringMode.StartsWith;
}

In incremental filtering mode, the ASPxComboBox can filter its items according to the format specified in the ASPxAutoCompleteBoxBase.TextFormatString property.

Contains + TextFormatString

<dx:ASPxComboBox ID="ASPxComboBox1" runat="server" DataSourceID="EmployeesDataSource"  ValueField="EmployeeID"
    DropDownStyle="DropDown" TextFormatString="{0} from {2}" IncrementalFilteringMode="Contains">
    <Columns>
        <dx:ListBoxColumn FieldName="FirstName" />
        <dx:ListBoxColumn FieldName="LastName" />
        <dx:ListBoxColumn FieldName="City" />
    </Columns>
</dx:ASPxComboBox>
<ef:EntityDataSource runat="server" ID="EmployeesDataSource" .../>

Run Demo: ASPxComboBox - Incremental Filtering

See Also