<pre> private Int32 _id = 0; public Int32 id { get { return _id; } set { _id = value; } } private string _name = string.Empty; public string name { get { return _name; } set { _name = value; } } private Int32 _ParentID = 0; public Int32 ParentID { get { return _ParentID; } set { _ParentID = value; } } private IEnumerable<clsChart> _children = null; public IEnumerable<clsChart> children { get { return _children; } set { _children = value; } }
dtChart = new DataTable(); dtChart.Columns.Add("id"); dtChart.Columns.Add("parentid");
[ { "id": "1", "children": [ { "id": "2", "children": [ { "id": "4", "children": [ { "id": "7" } ] }, { "id": "6" } ] }, { "id": "3", "children": [ { "id": "5" }, { "id": "8" } ] } ] } ]
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)