Expand and collapse all rowgroups

Expand and collapse all rowgroups

tnaveen29685tnaveen29685 Posts: 1Questions: 1Answers: 0

Hi,

I have a scenario where I should expand all and collapse all row groups with the click of an individual button which I achieved. Still, I have the scenario I selected expand all button which expands all rowgroups then when I choose a specific row group( xb) to collapse it collapses. then when I choose the collapse all button, all row groups are collapsed except the row group(xb) this xb row group is expanding instead of staying collapsed.

Any solution/approach how to implement such functionality.

Answers

  • kthorngrenkthorngren Posts: 20,322Questions: 26Answers: 4,774

    There are some custom rowGroup expand/collapse solutions on the forum that use an object called collapsedGroups or something along those lines. This is not a Datatables provided solution and is custom to each person who uses it. Assuming you are using the same you can probably find someone on the forum who has already done this. The collapsedGroups object keeps track of the collapsed state of each group with a boolean value. You can set the boolean true or false for all groups when trying to show or hide all. Debugging the variable should show how its being used.

    If you still need help then please provide a test case showing what you have so we can provide more specific options.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

Sign In or Register to comment.