This way of TreeGrid iteration has the following characteristic:
treegrid.forEachRow(function(id){ // function that gets row id as an incoming argument // here id - row ID do_something_with_row(id); })
You can loop from all child-rows of some row in treegrid as
treegrid._h2.forEachChild(parent_id,function(element){ //element.id - id of child row //element.parent.id - parent id do_something_with_row(element.id); });
where parent_id - id of rows, against which functionality will be executed.