HierarchyData LoadFromCsvContent Method Chart4.NET - Organization Charting Component (C#/VB.NET/ASP.NET) - Documentation
Onlinewww.Chart4.NET (Documentation) | OnlineSamples Download | Release Notes

Loads data from CSV (Comma Separated Values) content as a string.

Namespace: UnifoChart.Hierarchy
Assembly: UnifoChart.Hierarchy (in UnifoChart.Hierarchy.dll) Version: 5.1.0.0 (5.1.0)
Syntax

public string LoadFromCsvContent(
	string FileContent,
	string CommaString
)
public String LoadFromCsvContent(
	String FileContent,
	String CommaString
)

Parameters

FileContent
Type: OnlineSystem String
Valid CSV content.
CommaString
Type: OnlineSystem String
The string or character that has to be treated as a comma (,) within the text.

Return Value

Returns blank if succeeded, error message otherwise.
Remarks

First line of text is the header row of content. The 'CommaString' parameter is to include any additional comma within the text. In the example given here, a "+" is included in the second row of text. So "+" is given as 'CommaString' to treat "+" as ','.
Examples

            hierarchy1.hpcData.LoadFromCsvContent( 
@"id,pid,text,value,tooltip,photo
1,,DT_Text1,Value1,ToolTip1,Photo1.png
2,1,Tex+t11xx,Value11,ToolTip11,Photo11.png
3,1,Text12,Value12,ToolTip12,Photo12.png
4,1,Text13,Value13,ToolTip13,Photo13.png
5,3,Text121,Value121,ToolTip121,Photo121.png
6,3,Text122,Value122,ToolTip122,Photo122.png
7,3,Text123,Value123,ToolTip123,Photo123.png", "+" );//+ in text will be translated to ,
            hierarchy1.hpcData.ExpandAll( );
            hierarchy1.Refresh( );
See Also