429
Views
4
Comments
Solved
[OutSystems Data Grid Web] Expand/Collapse All for grouped rows
outsystems-data-grid-web
Web icon
Forge asset by OutSystems

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


2020-11-26 09-30-54
Ricardo Valim
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
2020-10-19 05-14-26
Huyen IT

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.


2020-11-26 09-30-54
Ricardo Valim
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
2026-01-15 03-18-59
Vijay Malviya

Hi Coy Kissee,

Please check attached oml.

hope this help you

CollapseSectionInTableRecord1.0.0O10.oap
UserImage.jpg
Coy Kissee

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

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.