Command
New-TableRowGrouping
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>]#Parameter set:
All Parameter SetsDescription
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
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
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
- Specifies the background color for the row grouping.
- -Color String
- Specifies the color for the row grouping.
- -ColumnID Int32
- Specifies the ID of the column to group rows by. Default value is -1.
- -Name String
- Specifies the name of the row grouping.
- -SortOrder String
- 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.