Data binds the Y-value(s) of the data points to the specified column(s) of the specified data source.
Data bind Y values of the data points to the data source. Data source can be the Array, Collection, Ole(SQL)DataReader, DataView, DataSet, DataTable or DataRow.
Visual Basic (Declaration) | |
---|---|
Public Overloads Sub DataBindY( _ ByVal yValue As IEnumerable, _ ByVal yFields As String _ ) |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public void DataBindY( IEnumerable yValue, string yFields ) |
Parameters
- yValue
-
Enumerable datasource object that provides the Y-value(s).
Enumerable objects with Y values. - yFields
-
Data source field(s) to bind data point(s) to. Note that a comma can be embedded as part of a column name by using a double comma.
Name of the field(s) for Y value(s).
This method binds the Y-values of the collection's data points to the specified fields(s) of the data source.
To bind only to the first field in a data source you can also use the DataBindY Method (IEnumerable).
You can bind to several fields by setting the yFields argument to multiple field names that are comma-separated. Note that the first field will be used for the data point's first Y-value, the second named field will be used for the data point's second Y-value, etc.
If Y-values are not provided by the datasource, or the wrong number of values are provided an exception will be thrown.
The following is a list of objects that you can use as the datasource (yValue parameter):
-
DataView
-
Data readers (SQL, OleDB)
-
Arrays
-
Lists
-
All other objects that use the IEnumerable interface.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family