DataPointCollection::DataBind Method (IEnumerable^, String^, String^, String^)
.NET Framework (current version)
Data binds the X-value, Y-value(s) and property values of the data points, such as Tooltip or LabelStyle, to the data source.
Assembly: System.Windows.Forms.DataVisualization (in System.Windows.Forms.DataVisualization.dll)
public: void DataBind( IEnumerable^ dataSource, String^ xField, String^ yFields, String^ otherFields )
Parameters
- dataSource
-
Type:
System.Collections::IEnumerable^
The data source to bind with X-value and Y-value(s).
- xField
-
Type:
System::String^
The name of the field for X-values.
- yFields
-
Type:
System::String^
A comma separated names of the fields for Y-values.
- otherFields
-
Type:
System::String^
Other data point properties with binding rules, in the format: PointProperty=Field[{Format}] [,PointProperty=Field[{Format}]].
For example: "Tooltip=Price{C1},Url=WebSiteName".
The data source can be the Ole(SQL)DataReader, DataView, DataSet, DataTable or DataRow.
.NET Framework
Available since 4.0
Available since 4.0
Show: