Expand / Collapse all rows
New DiscussionI'm trying to write code for a simple buttons 'Expand All' and 'Collapse All' and cannot get it to work.
I thought I could get 'allRows' and then call 'collapseRow' on each one, but this doesn't work :
var rows = $(grid).igTreeGrid("allRows");
for ( i=0; i<rows.length; i++ ) {
$(grid).igTreeGrid("collapseRow",rows[i]);
}
The 'row' returned from allRows is NOT accepted by 'collapseRow', even though the API Doc says the parameter is
"jQuery table row object, raw DOM row object or a row id."
I tried this with failure:
- $(grid).igTreeGrid("rows"); ==> returns the exact same array of rows
- $(grid).igTreeGrid("collapseRow",rows[i].element); ==> hangs the grid
- var id = row.id; ==> use id value like the returned row from 'selectedRow' method, but it doesn't exist
The only example of collapsing rows is in HierarchicalGrid which is totally different.
How can I accomplish this on a TreeGrid?
Thank you
Sign In
to post a reply
Replies
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Favorites
0 Replies
2 Created On
Feb 20, 2016 Last Post
10 years ago