aspnet-devexpress-dot-web-dot-autocompleteboxpropertiesbase-7a0d73c1.md
Gets or sets a value that specifies the filtering mode of the editor.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
[DefaultValue(IncrementalFilteringMode.Contains)]
public virtual IncrementalFilteringMode IncrementalFilteringMode { get; set; }
<DefaultValue(IncrementalFilteringMode.Contains)>
Public Overridable Property IncrementalFilteringMode As IncrementalFilteringMode
| Type | Default | Description |
|---|---|---|
| IncrementalFilteringMode | Contains |
One of the IncrementalFilteringMode enumeration values.
|
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.
|
The editor allows its items to be filtered in a drop down window by the text typed in the editor’s input box. Use the IncrementalFilteringMode property to specify the editor’s filter mode.
When callbacks are enabled (e.g., by setting the AutoCompleteBoxPropertiesBase.EnableCallbackMode property to true), the incremental filtering feature functions via callbacks to the server.
Note
The IncrementalFilteringMode property synchronizes its value with the editor’s ASPxAutoCompleteBoxBase.IncrementalFilteringMode property.
Web Forms approach:
Note
For a full example, see the ASPxComboBox - Cascading Combo Boxes demo.
<dx:ASPxComboBox runat="server" ID="CmbCountry" DropDownStyle="DropDownList" IncrementalFilteringMode="StartsWith"
TextField="CountryName" ValueField="CountryName" Width="100%" DataSourceID="CountriesDataSource"
EnableSynchronization="False">
<ClientSideEvents SelectedIndexChanged="function(s, e) { OnCountryChanged(s); }" />
</dx:ASPxComboBox>
var lastCountry = null;
function OnCountryChanged(cmbCountry) {
if (cmbCity.InCallback())
lastCountry = cmbCountry.GetValue().toString();
else
cmbCity.PerformCallback(cmbCountry.GetValue().toString());
}
function OnEndCallback(s, e) {
if (lastCountry) {
cmbCity.PerformCallback(lastCountry);
lastCountry = null;
}
}
MVC approach (Token Box):
@Html.DevExpress().TokenBox(settings =>
{
settings.Name = "tokenBox1";
settings.Properties.TextField = "Name";
settings.Properties.ValueField = "Email";
settings.Properties.IncrementalFilteringMode = IncrementalFilteringMode.StartsWith;
settings.Properties.IncrementalFilteringDelay = 500;
}).BindList(Model).GetHtml()
The image below illustrates the results.
The following code snippets (auto-collected from DevExpress Examples) contain references to the IncrementalFilteringMode property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
cs.IncrementalFilteringDelay = 1000;
cs.IncrementalFilteringMode = IncrementalFilteringMode.Contains;
cs.FilterMinLength = 2;
asp-net-mvc-grid-cascading-combo-boxes-in-edit-form/CS/Models/ComboBoxPropertiesProvider.cs#L75
cs.IncrementalFilteringDelay = 1000;
cs.IncrementalFilteringMode = IncrementalFilteringMode.Contains;
cs.FilterMinLength = 2;
cs.IncrementalFilteringDelay = 1000
cs.IncrementalFilteringMode = IncrementalFilteringMode.Contains
cs.FilterMinLength = 2
asp-net-mvc-grid-cascading-combo-boxes-in-edit-form/VB/Models/ComboBoxPropertiesProvider.vb#L68
cs.IncrementalFilteringDelay = 1000
cs.IncrementalFilteringMode = IncrementalFilteringMode.Contains
cs.FilterMinLength = 2
See Also
AutoCompleteBoxPropertiesBase Class