Xceed Grid for WinForms v4.3 Documentation
DataSource Property (ComboBoxViewer)


Xceed.Grid.v4.3 Assembly > Xceed.Grid.Viewers Namespace > ComboBoxViewer Class : DataSource Property
Gets or sets the data source used to populate the ComboBoxViewer
Syntax
'Declaration
 
<DescriptionAttribute("The data source used to populate the ComboBoxViewer.")>
<CategoryAttribute("Data")>
<DefaultValueAttribute("")>
<RefreshPropertiesAttribute(RefreshProperties.Repaint)>
<TypeConverterAttribute("System.Windows.Forms.Design.DataSourceConverter, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")>
Public Property DataSource As Object
'Usage
 
Dim instance As ComboBoxViewer
Dim value As Object
 
instance.DataSource = value
 
value = instance.DataSource
[Description("The data source used to populate the ComboBoxViewer.")]
[Category("Data")]
[DefaultValue("")]
[RefreshProperties(RefreshProperties.Repaint)]
[TypeConverter("System.Windows.Forms.Design.DataSourceConverter, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public object DataSource {get; set;}

Property Value

A reference to an object representing the data source to use to populate the ComboBoxViewer.
Remarks

If the DataSource contains more than one table, you must set the DataMember property to a string that represents the name of the table to bind to.

The following is a list of the supported data sources:

System.Data.DataTable Represents one table of in-memory data.
System.Data.DataView Represents a databindable, customized view of a System.Data.DataTable for sorting, filtering, searching, editing, and navigation.
System.Data.DataSet Represents an in-memory cache of data.
System.Data.DataViewManager Contains a default System.Data.DataViewSettingCollection for each System.Data.DataTable in a System.Data.DataSet.
Any component that implements the System.ComponentModel.IListSource interface. Provides functionality to an object to return a list that can be bound to a data source.
Any component that implements the System.Collections.IList interface. Represents a collection of objects that can be individually accessed by index.
Jagged arrays A jagged array is an array whose elements are arrays.

If the data source is a jagged array and rows are added or removed from the jagged array from outside of the ComboBoxViewer, then the jagged array must be reassigned to the DataSource property in order for the modifications to be reflected in the ComboBoxViewer.

If an existing value is changed in the jagged array from outside of the ComboBoxViewer, for example the text of one of the elements, in order for the changes to be reflected in the ComboBoxViewer, the jagged array must be reassigned to viewer.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ComboBoxViewer Class
ComboBoxViewer Members
DataMember Property
SetDataBinding Method