RealGrid2 Guide
Tree
Tree - Object Data

Tree - Object Data

You can use Json format data to implement TreeView. Use setObjectRows() to display data in Json format.

setObjectRows()

treeProvider.setObjectRows(data, "rows", "", "");

Object Data

This is JSON format data to implement a tree.

{
   "rows": [{
       "icon": "0",
       "col0": "Man",
       "col1": "11723",
       "col2": "1258",
       "col3": "29500",
       "col4": "21401",
       "col5": "28261",
       "col6": "3732",
       "col7": "7393",
       "rows": [{
           "icon": "2",
           "col0": "Asia",
           "col1": "4244",
           "col2": "133",
           "col3": "11565",
           "col4": "5866",
           "col5": "9024",
           "col6": "2256",
           "col7": "4129",
           "rows": [{
               "icon": "4",
               "col0": "Cyprus",
               "col1": "12",
               "col2": "0",
               "col3": "26",
               "col4": "43",
               "col5": "40",
               "col6": "14",
               "col7": "14"
           }, {
                ... skip ...
           }]
       }, {
           "icon": "2",
           "col0": "North America",
           "col1": "7062",
           "col2": "1101",
           "col3": "17234",
           "col4": "14992",
           "col5": "18465",
           "col6": "1321",
           "col7": "2658",
           "rows": [{
               "icon": "8",
               "col0": "Canada",
               "col1": "319",
               "col2": "225",
               "col3": "1537",
               "col4": "1565",
               "col5": "1654",
               "col6": "470",
               "col7": "837"
           }, {
               ... skip ...