Skip to main content

ComboBoxExtension.BindList(ItemsRequestedByFilterConditionMethod, ItemRequestedByValueMethod) Method

Allows you to dynamically populate the editor dropdown list when using a large data source.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v24.1.dll

NuGet Package: DevExpress.Web.Mvc5

Declaration

public ComboBoxExtension BindList(
    ItemsRequestedByFilterConditionMethod itemsRequestedByFilterConditionMethod,
    ItemRequestedByValueMethod itemRequestedByValueMethod
)

Parameters

Name Type Description
itemsRequestedByFilterConditionMethod ItemsRequestedByFilterConditionMethod

A delegate method of the ItemsRequestedByFilterConditionMethod type that enables you to implement custom selection of the requested items by the filter conditions.

itemRequestedByValueMethod ItemRequestedByValueMethod

A delegate method of the ItemRequestedByValueMethod type that enables you to implement custom selection of the requested item by the value.

Returns

Type Description
ComboBoxExtension

A ComboBoxExtension object specifying the ComboBox.

Remarks

This specifically parameterized BindList method can be used to display and filter the editor’s data source containing a large amount of records. The method’s parameters refer to delegate methods that can be declared as static methods within a model class. By providing implementation of these methods, you can 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.

Using this approach, the ComboBox doesn’t perform filter operations on the entire database by itself. Instead, all the necessary data processing is delegated to the database server, which returns only small portions of the required data displayed by the editor.

This technique minimizes the application server’s workload, and significantly reduces the application’s response time. Using this technique allows you to deliver your customers the capability to quickly and efficiently search against a huge amount of data.

Example

@Html.DevExpress().ComboBox(settings => {
    settings.Name = "comboBox";
    ...
}).BindList(LargeDatabaseDataProvider.GetPersonsRange, LargeDatabaseDataProvider.GetPersonByID).GetHtml()

Online Demo

ComboBox - Custom binding

See Also