Muokkaa

Jaa


DataPointCollection.DataBindY Method

Definition

Data binds the Y-value(s) of the data points to the specified column(s) of the specified data source.

Overloads

DataBindY(IEnumerable[])

Data binds the Y-value(s) of the collection's data points to the first column of the specified data source(s).

DataBindY(IEnumerable, String)

Data binds the Y-value(s) of the data points to the specified column(s) of the specified data source.

DataBindY(IEnumerable[])

Data binds the Y-value(s) of the collection's data points to the first column of the specified data source(s).

public:
 void DataBindY(... cli::array <System::Collections::IEnumerable ^> ^ yValue);
public void DataBindY (params System.Collections.IEnumerable[] yValue);
member this.DataBindY : System.Collections.IEnumerable[] -> unit
Public Sub DataBindY (ParamArray yValue As IEnumerable())

Parameters

yValue
IEnumerable[]

One or more comma-separated IEnumerable<T> data sources.

Remarks

This method binds the Y-value(s) of the data points in the collection to the first column of the specified data source(s).

To bind Y-values to a data source column that is not the first available column, use the DataBindY method.

You can bind several Y-values by specifying multiple data sources, using the yValue parameter. Note that the first available column in each data source will be used for each data point's successive Y-values. For example, the first column of the first IEnumerable<T> data source will be bound to the first Y-value of data points, the first column of the second IEnumerable<T> data source will be bound to the second Y-value of data points, and so forth.

If Y-values are not provided by the data source, or if 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 data source parameter:

The following is a list of objects that you can use as the data source:

  • DataView

  • Data readers (SQL, OleDB)

  • Arrays

  • Lists

  • All other objects that use the IEnumerable<T> interface.

Applies to

DataBindY(IEnumerable, String)

Data binds the Y-value(s) of the data points to the specified column(s) of the specified data source.

public:
 void DataBindY(System::Collections::IEnumerable ^ yValue, System::String ^ yFields);
public void DataBindY (System.Collections.IEnumerable yValue, string yFields);
member this.DataBindY : System.Collections.IEnumerable * string -> unit
Public Sub DataBindY (yValue As IEnumerable, yFields As String)

Parameters

yValue
IEnumerable

An IEnumerable<T> data source object that provides the Y-value(s).

yFields
String

The data source field(s) to which to bind data point(s). Note that a comma can be embedded as part of a column name, by using a double comma.

Remarks

This method binds the Y-values of the data points in the collection to the specified fields(s) of the data source.

To bind only to the first field in a data source, use the DataBindY method.

You can bind to several fields by setting the yFields parameter 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, and so forth.

If Y-values are not provided by the data source, 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 data source:

  • DataView

  • Data readers (SQL, OleDB)

  • Arrays

  • Lists

  • All other objects that use the IEnumerable<T> interface.

Applies to