A newer version of this page is available. Switch to the current version.

BaseListBoxControl.DataSource Property

Gets or sets the data source that provides items to display in the control.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v19.2.dll


public virtual object DataSource { get; set; }

Property Value

Type Default Description


A data source object whose data is displayed by the ListBox control.


Use the DataSource property to bind the control to a data source and thus display data source records as listbox items. The data source can be any object implementing the IList or IListSource interface. Changing the DataSource property value at runtime raises the BaseListBoxControl.DataSourceChanged event.

The following properties can be additionally customized:

To retrieve listbox items in bound mode, use the BaseListBoxControl.GetItem method.

To populate the ListBox control in unbound mode, add items to the control's Items collection (ListBoxControl.Items, BaseCheckedListBoxControl.Items or BaseImageListBoxControl.Items).

See Also