Dundas Chart for Windows Forms
DataSource Property
See Also  Send comments on this topic.
DundasWinChart Assembly > Dundas.Charting.WinControl Namespace > Chart Class : DataSource Property


Gets or sets the data source for the Chart object.


"The data source used to populate series data. Series ValueMember properties must be also set."

Syntax

Visual Basic (Declaration)  
Public Property DataSource As Object
Visual Basic (Usage) Copy Code
Dim instance As Chart
Dim value As Object
 
instance.DataSource = value
 
value = instance.DataSource
C#  
public object DataSource {get; set;}

Return Value

An object that represents the data source for the chart object.

Remarks

A series' data points can be bound to a data source at any time using the DataSource property.

To force the binding of the chart to the data source the method Chart.Databind should be called.

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

  • DataView

  • Data readers (SQL, OleDB)

  • DataSet

  • DataTable

  • BindingSource

  • IDataSource

  • Arrays

  • Lists

  • All Enumerable objects

  • SqlCommand / OleDbCommand (DataSource data-binding ONLY)

  • SqlDataAdapter / OleDbDataAdapter (DataSource data-binding ONLY).

Requirements

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

See Also

© 2009 All Rights Reserved.