On-Demand Item Loading (Callback Mode)

  • 2 minutes to read

In contrast to the default load mode, you can also use callbacks to load ASPxComboBox items from a server on demand. For instance, you can load list items that are not currently displayed within the editor's dropdown window dynamically when a user scrolls the list. This item load mode is available if the ASPxAutoCompleteBoxBase.EnableCallbackMode property is set to true. In this mode, the ASPxAutoCompleteBoxBase.CallbackPageSize property defines the number of items to be obtained from the server, as required.

This callback mode speeds up the initial page load, since only a few items need to be loaded.

NOTE

If the control ViewState is enabled, it gets all items on load, regardless of the EnableCallbackMode property value (exclude the multicolumn mode). Therefore, it is recommended that you disable the view state when you use callback mode.

Note, however, that in this mode, the ASPxComboBox editor still processes data (for example, filter operations) at the web application server level. For this purpose, the editor retrieves all data items of the bound data source from the database server to the web server, which increases the web server workload. This might result in a performance bottleneck when you bind ASPxComboBox editors to large data sources (containing tens of thousands of records). To increase the ASPxComboBox's performance in this case, you can handle specific events to dynamically populate the editor's dropdown list.

NOTE

If you set the ASPxAutoCompleteBoxBase.EnableCallbackMode property, it affects the ASPxAutoCompleteBoxBase.EnableSynchronization property's default value. See the ASPxAutoCompleteBoxBase.EnableSynchronization property description for more details.

NOTE

In callback mode, the client-side combo box contains only items that are currently displayed within the editor's dropdown window, so you cannot use the client ASPxClientComboBox.SetText or ASPxClientEditBase.SetValue method to select an invisible item.

Online Demo