ASPxAutoCompleteBoxBase.FilterMinLength Property
Specifies the minimum length of the filter string.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
Int32 | 0 | The minimum length of the filter string. |
Remarks
The editor starts to filter items when the filter string has the specified number of symbols.
In markup:
<dx:ASPxComboBox ID="Countries" runat="server" EnableCallbackMode="True" FilterMinLength="3" DataSourceID="SqlDataSource1" TextField="City" ValueField="City">
</dx:ASPxComboBox>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ...></asp:SqlDataSource>
In code:
protected void Page_Load(object sender, EventArgs e){
// Declare the editor.
ASPxComboBox cb = new ASPxComboBox();
cb.ID = "Countries";
cb.EnableCallbackMode = true;
cb.FilterMinLength = 3;
form1.Controls.Add(cb);
// Create and fill a dataset.
SqlDataSource ds = new SqlDataSource(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\nwind.mdb;Persist Security Info=True", "SELECT [City] FROM [Customers]");
ds.ProviderName = "System.Data.OleDb";
ds.ID = "ds";
// Specify the data source for the editor.
cb.DataSource = ds;
cb.ValueField = "City";
cb.TextField = "City";
cb.DataBind();
}
See Also