You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
New-HTMLTableRowGrouping for more then one field #251
Hey Master PrzemyslawKlys,
I was to do subgrouping for a table, anyway this can be done with New-HTMLTableRowGrouping ? since it looks like it takes only one field.
for example, i have a global user list, i want to group them by geographic location, and then in that geo grouping, to group them again by manager.
Multiple row-grouping levels are supported by the change merged in #533, with independent collapse state for each group path. This covers grouping by location and then by manager. The updated module has not been published yet.
Multiple grouping levels are available in PSWriteHTML 1.45.0, following #533. Add one New-TableRowGrouping per level inside the table, for example New-TableRowGrouping -Name Location followed by New-TableRowGrouping -Name Manager; each group path has independent collapse state. Update the module and regenerate the report.
Activity
tomerikko commentedon Aug 2, 2021
@PrzemyslawKlys , any thoughts would be appreciated :)
PrzemyslawKlys commentedon Aug 2, 2021
I did quick implementation and I think I did it using a plugin
rowGroup: { // Uses the 'row group' plugin dataSrc: 2, startRender: function (rows, group) { var collapsed = !!collapsedGroups[group]; rows.nodes().each(function (r) { r.style.display = collapsed ? 'none' : ''; }); var toggleClass = collapsed ? 'fa-plus-square' : 'fa-minus-square'; // Add group name to <tr> return $('<tr/>') .append('<td colspan="' + rows.columns()[0].length + '">' + '<span class="fa fa-fw ' + toggleClass + ' toggler"/> ' + group + ' (' + rows.count() + ')</td>') .attr('data-name', group) .toggleClass('collapsed', collapsed); }, },While what I can see:
rowGroup: { dataSrc: [ 5, 1 ] }, columnDefs: [ { targets: [ 1, 2 ], visible: false } ],Is much easier but also with more options.
PrzemyslawKlys commentedon Oct 30, 2026
Multiple row-grouping levels are supported by the change merged in #533, with independent collapse state for each group path. This covers grouping by location and then by manager. The updated module has not been published yet.
PrzemyslawKlys commentedon Nov 17, 2026
Multiple grouping levels are available in PSWriteHTML 1.45.0, following #533. Add one
New-TableRowGroupingper level inside the table, for exampleNew-TableRowGrouping -Name Locationfollowed byNew-TableRowGrouping -Name Manager; each group path has independent collapse state. Update the module and regenerate the report.