dotnetCHARTING Send comments on this topic.
Data Property
See Also  Example
dotnetCHARTING Namespace > DataEngine Class : Data Property


Gets or sets a DataTable, DataSet, DataView, XML file name, Xml string or an object that implement IEnumerable, ArrayList or HashTable used to generate a SeriesCollection.

Syntax

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

Example

This example sets the data property to a dataTable and defines data fields mapping.
C#Copy Code
DataEngine de = new DataEngine();
de.Data = myDataTable;
de.DataFields =
"XAxis=FirstCol,YAxis=SecondCol";
Chart.SeriesCollection.Add(de.GetSeries());
    
Visual BasicCopy Code
Dim de As New DataEngine()
de.Data = myDataTable
de.DataFields = "XAxis=FirstCol,YAxis=SecondCol"
Chart.SeriesCollection.Add(de.GetSeries())

Example

Remarks

When not connecting to a database directly using ConnectionString and SqlStatement, this property offers an alternative method for obtaining database data.

See Also

© 2010 All Rights Reserved.