127
Views
4
Comments
Solved
[Data Grid Web] Expand/Collapse All for grouped rows
Forge component by OutSystems R&D
41
Published on 18 Nov 2020

Is there a way to allow for an expand all/collapse all on the group rows in the Data Grid?


Staff
Rank: #3765
Solution

Hello Coy Kissee 


It does this by calling the collapseGroupsToLevel method and passing either zero (to collapse all nodes) or rows.maxGroupLevel + 1 (to expand all nodes). 


If you wanna try it by Dev Tools:

  • GridOS.GridObject[0].grid.collapseGroupsToLevel(0); //To collapse all groups
  • GridOS.GridObject[0].grid.collapseGroupsToLevel(GridOS.GridObject[0].grid.rows.maxGroupLevel+1); //To expand them all


 In attachment I made a sample for you, hope can help you solve this problem.


Regards,

Ricardo Valim

DataGridButtonCollapseGroups.oml

Rank: #764

Hi Coy Kissee,

I found expand/collapse process in the WijmoGridJS.js file but could not read it so temporarily I couldn't handle it.


Staff
Rank: #3765
Solution

Hello Coy Kissee 


It does this by calling the collapseGroupsToLevel method and passing either zero (to collapse all nodes) or rows.maxGroupLevel + 1 (to expand all nodes). 


If you wanna try it by Dev Tools:

  • GridOS.GridObject[0].grid.collapseGroupsToLevel(0); //To collapse all groups
  • GridOS.GridObject[0].grid.collapseGroupsToLevel(GridOS.GridObject[0].grid.rows.maxGroupLevel+1); //To expand them all


 In attachment I made a sample for you, hope can help you solve this problem.


Regards,

Ricardo Valim

DataGridButtonCollapseGroups.oml

Rank: #144

Hi Coy Kissee,

Please check attached oml.

hope this help you

CollapseSectionInTableRecord1.0.0O10.oap

Rank: #28710

Vijay,


That is very useful, but was not in the context of what I was trying to accomplish.  Ricardo's solution is what worked for me.


Thanks,

Coy