universal-dashboard
universal-dashboard copied to clipboard
Add -GroupBy in UDGrid
Would love to see a way to have a UDGrid with rows that show a grouping.
For example:
| Day | Invoice | Total |
|---|---|---|
| January | ||
| 2 | 0348 | 248.35 |
| 7 | 0349 | 126.14 |
| 18 | 0350 | 821.99 |
| February | ||
| 27 | 0351 | 643.50 |
So the data would already have a 'Month' property, and you could simply tell UDGrid to group the data by that value.
OR
You do whatever grouping you want in PS, and Out-UDGridData detects that the data is in a group, and uses the Name and the Group property to generate the UDGridData properly.
And the HTML is quite simple, since we already know the number of properties/header, all you need to add is:
<tr>
<td colspan=3>January</td>
</tr>