Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
150
How to populate hierarchial grid using client-side script?
posted

I have a 2-level grid showing log entries and details for each log entry. I am able to populate the log entries, i.e., first level, using client-side script.

var grid = igtbl_getGridById("my_grid");

for (var i = 0; i < result.length; i++) {  var row = grid.Rows.addNew();

  row.getCell(0).setValue('value 0');

  row.getCell(1).setValue('value 1');

  ...

}

  1. How do I populate the 2nd level entries for each 1st level entry using client-side javascript?
  2. Can this be done on demand using javascript? That is, only populate the detail when the user tries to expand the parent level.

 

Thank you,

Girish