Skip to main content
Tab

ListBoxProperties.EnableCallbackMode Property

Specifies whether the editor’s list items can be loaded to the client side on demand via callbacks.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

Declaration

[DefaultValue(false)]
public virtual bool EnableCallbackMode { get; set; }

Property Value

Type Default Description
Boolean false

true, if on demand item loading is available; otherwise, false.

Remarks

By default, the EnableCallbackMode property is set to false. This causes all list items of the editor to be sent to the client side and presented in the editor’s list.

If the EnableCallbackMode property is set to true, the editor loads its items from the server on demand, via callbacks (for instance, list items, which are not currently displayed within the editor’s dropdown window, can be dynamically loaded when an end-user scrolls the list). The number of items to be obtained from the server each time it’s required is specified via the ListBoxProperties.CallbackPageSize property. This mode makes the first page load much faster, since only a few items need to be loaded initially.

Callback Mode Limitations

  • The EnableCallbackMode property is not used in MVC ListBox. Specify ListBoxSettings.CallbackRouteValues settings to define the callback routing logic in ASP.NET MVC.
  • If the control ViewState is enabled, it gets all items on a load, regardless of the EnableCallbackMode property value (excluding the multicolumn mode). Therefore, it is recommended for you to disable the view state when you use callback mode.
  • Loading items on demand is supported in single selection mode only (the SelectionMode) property is set to Single). In other selection modes, all list items are always sent to the client. So, setting the editor’s EnableCallbackMode and CallbackPageSize properties is not in effect.

If you need to implement the selection feature and your data source is large, use ASPxGridView in server mode rather than ASPxListBox. Review the Binding to Large Data (Database Server Mode) topic for more details.

Note

The setting of the EnableCallbackMode property affects the EnableSynchronization property’s default value. See the EnableSynchronization property’s description for more details.

See Also