Make tree grid


grid1.setOption('treeItemName'   , 'num'      );     // key
grid1.setOption('treeParentName' , 'parentNum');     // parent key
grid1.setOption('treeRootValue'  , 0);               // start level value

grid1.hideToolbarButtons('group');
grid1.hideToolbarButtons('fixedColumn');

grid1.setGridMode('tree');
grid1.setData(jsonData);
 

tree depth

  • grid.setData(jsonData, 1); //Display 1 depth
  • grid.setData(jsonData, 2); //Display 2 depth
  • grid.setData(jsonData); //Display all depth
  • tree node depth : starting from 1.

grid.setData(jsonData, 1);
grid.setData(jsonData, 2);
grid.setData(jsonData)