Back to Devexpress

ASPxAutoCompleteBoxBase.IncrementalFilteringMode Property

aspnet-devexpress-dot-web-dot-aspxautocompleteboxbase-1a6a16be.md

latest3.8 KB
Original Source

ASPxAutoCompleteBoxBase.IncrementalFilteringMode Property

Specifies the incremental filter mode.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue(IncrementalFilteringMode.Contains)]
public virtual IncrementalFilteringMode IncrementalFilteringMode { get; set; }
vb
<DefaultValue(IncrementalFilteringMode.Contains)>
Public Overridable Property IncrementalFilteringMode As IncrementalFilteringMode

Property Value

TypeDefaultDescription
IncrementalFilteringModeContains

A value of the enumeration.

|

Available values:

NameDescription
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”

  • IncrementalFilteringMode=”StartsWith”

The editor can use callbacks in incremental filter mode.

In markup:

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

In code:

csharp
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.

aspx
<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

Filter Data

IncrementalFilteringMode

FilterMinLength

IncrementalFilteringDelay

ASPxAutoCompleteBoxBase Class

ASPxAutoCompleteBoxBase Members

DevExpress.Web Namespace