You can expand row groups by default on load when using SSRM using a callback as documented here:
https://www.ag-grid.com/javascript-data-grid/server-side-model-grouping/#open-by-default
Calling api.expandAll() and api.collaseAll() methods has no effect when using SSRM because not all rows are loaded.
You can only expand/collapse group nodes which are already loaded using api.forEachNode and calling the setExpanded method on each group node.
https://www.ag-grid.com/javascript-data-grid/grid-api/#reference-rowNodes-forEachNode
https://www.ag-grid.com/javascript-data-grid/row-object/#reference-expand-setExpanded
However, this will only affect rows which are already loaded by the grid.
Comments
1 comment
Is there anyway to simulate Expand/Collapse All on server side pivot mode by calling a set of APIs?
e.g. SetExpand? I am able to do on first level, but if there are more than one level (group columns), how to do it recursively is the question?
Please sign in to leave a comment.