www.Chart4.NET | Samples
Assembly: UnifoChart.Hierarchy (in UnifoChart.Hierarchy.dll) Version: 2.6.0.0 (2.6)
CopyC#
Loads data from the given DataTable object. See example below for the desired DataTable format.
Namespace:
UnifoChart.HierarchyAssembly: UnifoChart.Hierarchy (in UnifoChart.Hierarchy.dll) Version: 2.6.0.0 (2.6)
Syntax
| C# |
|---|
public string LoadFromDataTable( ref DataTable DTable ) |
| Visual Basic (Declaration) |
|---|
Public Function LoadFromDataTable ( _ ByRef DTable As DataTable _ ) As String |
| Visual Basic (Usage) |
|---|
Dim instance As HierarchyData Dim DTable As DataTable Dim returnValue As String returnValue = instance.LoadFromDataTable(DTable) |
| Visual C++ |
|---|
public: String^ LoadFromDataTable( DataTable^% DTable ) |
| J# |
|---|
public String LoadFromDataTable( /** @ref */DataTable DTable ) |
| JScript |
|---|
public function LoadFromDataTable( DTable : DataTable ) : String |
| JavaScript |
|---|
function LoadFromDataTable(DTable); |
Parameters
- DTable
- Type:
System.Data..::.DataTable
%
The DataTable object that contains data
Return Value
Returns blank if succeeded, error message otherwise.
Examples
DataTable dt = new DataTable( ); dt.Columns.Add( "id" ); dt.Columns.Add( "pid" ); dt.Columns.Add( "text" ); dt.Columns.Add( "value" ); dt.Columns.Add( "tooltip" ); dt.Columns.Add( "photo" ); //use object[], if different datatypes dt.Rows.Add( new string[] { "1", "", "DT_Text1", "Value1", "ToolTip1", "Photo1.png" } ); dt.Rows.Add( new string[] { "2", "1", "Text11", "Value11", "ToolTip11", "Photo11.png" } ); dt.Rows.Add( new string[] { "3", "1", "Text12", "Value12", "ToolTip12", "Photo12.png" } ); dt.Rows.Add( new string[] { "4", "1", "Text13", "Value13", "ToolTip13", "Photo13.png" } ); dt.Rows.Add( new string[] { "5", "3", "Text121", "Value121", "ToolTip121", "Photo121.png" } ); dt.Rows.Add( new string[] { "6", "3", "Text122", "Value122", "ToolTip122", "Photo122.png" } ); dt.Rows.Add( new string[] { "7", "3", "Text123", "Value123", "ToolTip123", "Photo123.png" } ); hierarchy1.hpcData.LoadFromDataTable( ref dt ); hierarchy1.hpcData.ExpandAll( ); hierarchy1.Refresh( );
