# New-TableRowGrouping

Creates a new table row grouping object with specified attributes.

Project

PSWriteHTML

Generate HTML reports, dashboards, and emails from PowerShell without writing HTML, CSS, or JavaScript.

[View on GitHub](https://github.com/EvotecIT/PSWriteHTML) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteHTML/releases/tag/v1.41.0) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteHTML/1.40.0)

Stars **1,025**

Forks **114**

Open issues 

PowerShell Gallery downloads **7,576,901**

Release **v1.45.0**

Language: PowerShell Updated: 2026-11-19

Command 

**Module**

`PSWriteHTML`

Creates a new table row grouping object with specified attributes.

## Syntax

```
New-TableRowGrouping
[[-BackgroundColor] <String>]
[[-Color] <String>]
[[-ColumnID] <Int32>]
[[-Name] <String>]
[[-SortOrder] <Ascending|Descending>]
[<CommonParameters>]
```

[#](#method-new-tablerowgrouping-string-string-int32-string-string)

Parameter set: `All Parameter Sets`

## Description

This function creates a new table row grouping object with the provided attributes. It enables the feature for DataTablesRowGrouping in the HTML schema.

## Examples

### Example 1

```powershell
New-TableRowGrouping -Name "Group A" -ColumnID 1 -SortOrder 'Ascending' -Color 'Red' -BackgroundColor 'LightGray'
Creates a new table row grouping object for Group A, grouping by column ID 1 in ascending order with red text and light gray background.
```

### Example 2

```powershell
New-TableRowGrouping -Name "Group B" -ColumnID 2 -SortOrder 'Descending' -Color 'Blue' -BackgroundColor 'White'
Creates a new table row grouping object for Group B, grouping by column ID 2 in descending order with blue text and white background.
```

## Parameters

**-BackgroundColor String optionalposition: 4**

Specifies the background color for the row grouping.

**-Color String optionalposition: 3**

Specifies the color for the row grouping.

**-ColumnID Int32 optionalposition: 1**

Specifies the ID of the column to group rows by. Default value is -1.

**-Name String optionalposition: 0aliases: ColumnName**

Specifies the name of the row grouping.

**-SortOrder String optionalposition: 2**

Specifies the sort order for the grouped rows. Valid values are 'Ascending' or 'Descending'. Default is 'Ascending'.

Possible values: `Ascending`, `Descending`

## Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see [about_CommonParameters](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:3DB780257D40832DC4E741799EFB072ED63065E725B73923C33B37E335A8E806 -->
