BaseListControlDataSource Property

This gets or sets the data source for the list control

Definition

Namespace: EWSoftware.ListControls
Assembly: EWSoftware.ListControls (in EWSoftware.ListControls.dll) Version: 2023.4.9.0
[TypeConverterAttribute("System.Windows.Forms.Design.DataSourceConverter, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public Object DataSource { get; set; }

Property Value

Object

The data source object must support the IList interface such as a DataSet or an Array. The default is null and it will use whatever is in the Items collection instead. If using a data source, set the DisplayMember and ValueMember properties too. Setting this property to null also clears the DisplayMember property.

A data source cannot be used with the SortOrder property. If a non-null data source is set, the SortOrder property is set to None automatically.

Exceptions

ArgumentExceptionThis is thrown if the data source does not support the IList interface.

See Also