Skip to content

New-SpectreGridRow

Description

Creates a new SpectreGridRow object with the specified columns for use in Format-SpectreGrid. PowerShell collapses nested arrays, so you must use this function to create an array of SpectreGridRow objects to provide to Format-SpectreGrid.


Examples

Example 1 # This example demonstrates how to create a grid with two rows and three columns.

Terminal window
$columns = @()
$columns += "Column 1" | Format-SpectrePanel
$columns += "Column 2" | Format-SpectrePanel
$columns += "Column 3" | Format-SpectrePanel
$rows = @(
(New-SpectreGridRow -Data $columns),
(New-SpectreGridRow -Data $columns)
)
$rows | Format-SpectreGrid

Parameters

Data

An array of renderable items containing the data to be displayed in the columns of this row.

TypeRequiredPositionPipelineInput
[Array]true1true (ByValue)

Syntax

Terminal window
New-SpectreGridRow [-Data] <Array> [<CommonParameters>]