Change Theme Settings
Change Theme Settings
Show All Themes

Custom Binding

To start filtering, enter at least two symbols (e.g. 'an') into the editor's text box. This is due to the editor's FilterMinLength property set to 2 in this demo.
Customer Details
First Name:
Last Name:

The specifically parameterized BindList method can display and filter a ComboBox data source with a large number of records (about 20 000). Its parameters refer to delegate methods declared as static methods within a model class. Implement these methods to populate the editor's dropdown list with required item portions (based on the currently applied filter criteria and list scrolling) and obtain a data item corresponding to the selected item.

These methods allow you to populate the editor's dropdown list with the required item portions (based on the currently applied filter criteria and the performed list scrolling) and obtain the data item corresponding to the editor's selected item.

In this demo, the ComboBox doesn't perform filter operations on the entire database by itself. Instead, the editor delegates all data processing to the database server that returns only small data portions.

This technique allows you to implement custom data binding and filtering using any model event with a large amount of data.

When the ComboBox is in incremental filtering mode, it can start filtering only after an end-user has typed a specific number of symbols in the editor's text box. The Properties.FilterMinLength property can be used to define the minimum length for the filter string input. Filtering starts once the minimum length is reached.

Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
The source code files for this demo are installed (by default) in the following directory:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\MVCxDataEditorsDemos