New-UDTableColumn
Synopsis
Defines a table column.
Syntax
New-UDTableColumn [[-Id] <String>] [-Property] <String> [[-Title] <String>] [[-OnRender] <ScriptBlock>] [-ShowSort] [-ShowFilter] [[-FilterType] <String>] [[-Style] <Hashtable>] [[-Width] <Int32>] [[-MinWidth] <Int32>] [-IncludeInSearch] [-IncludeInExport] [-DefaultSortColumn] [[-Align] <String>] [-Truncate] [[-SortType] <String>] [-Hidden] [[-Options] <String[]>] [[-Header] <ScriptBlock>] [<CommonParameters>]Description
Defines a table column. Use this cmdlet in conjunction with New-UDTable's -Column property. Table columns can be used to control many aspects of the columns within a table.
Parameters
-Id
The ID of the component. It defaults to a random GUID.
Required? false
Position? 1
Default value [Guid]::NewGuid().ToString()
Accept pipeline input? false
Aliases
Accept wildcard characters? false-Property
The property to select from the data.
-Title
The title of the column to show at the top of the table.
-OnRender
-ShowSort
Whether this column supports sorting.
-ShowFilter
Whether this column supports filtering.
-FilterType
The type of filter to use with this column. Valid values are "text", "select", "fuzzy", "slider", "range", "date", "number", 'autocomplete', 'multiselect'
-Style
A hashtable of style attributes to apply to the column.
-Width
The width of this column in pixels.
-MinWidth
-IncludeInSearch
Whether to include this column in the search.
-IncludeInExport
Whether to include this column in the export.
-DefaultSortColumn
Sets this column as the default sort column.
-Align
The alignment of the column. Supported values are 'center', 'inherit', 'justify', 'left', 'right'.
-Truncate
Whether to truncate the text in this column. A -Width is required to use truncate.
-SortType
Whether to sort this column as a string or datetime.
-Hidden
Includes a column in the table but does not show it. This is useful for columns that are used for filtering and exporting but are not meant to be displayed in the table.
-Options <String[]>
The options to use for a select filter.
-Header
Script block that renders custom header content for this column instead of the default table header. Its output is assigned to the column's customHeader property.
Common parameters
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters.
Outputs
Examples
Example 1
See New-UDTable for examples.
Last updated
Was this helpful?