For the complete documentation index, see llms.txt. This page is also available as Markdown.

New-UDTable

Creates a table.

Synopsis

Creates a table.

Syntax

New-UDTable [-Id <String>] [-Title <String>] [-Data <Object[]>] [-Columns <Hashtable[]>] [-OnRowSelection <Endpoint>] [-ShowSort] [-ShowFilter] [-ShowSearch] [-Dense] [-ShowExport] [-StickyHeader] [-PageSize <Int32>] [-PageSizeOptions <Int32[]>] [-PaginationLocation <String>] [-ShowSelection] [-ShowPagination] [-Padding <String>] [-Size <String>] [-TextOption <Hashtable>] [-ExportOption <String[]>] [-OnExport <Endpoint>] [-DisablePageSizeAll] [-DefaultSortDirection <String>] [-HideToggleAllRowsSelected] [-DisableMultiSelect] [-DisableSortRemove] [-Icon <Hashtable>] [-ClassName <String>] [-ShowRefresh] [-ToolbarContent <ScriptBlock>] [-OnRowExpand <ScriptBlock>] [-MaxHeight <Int32>] [-Language <String>] [-RemoveCard] [-OnRowStyle <ScriptBlock>] [-HeaderStyle <Hashtable>] [-InitialState <Hashtable>] [<CommonParameters>]

    New-UDTable [-Id <String>] [-Title <String>] -LoadRows <Endpoint> [-Columns <Hashtable[]>] [-OnRowSelection <Endpoint>] [-ShowSort] [-ShowFilter] [-ShowSearch] [-Dense] [-ShowExport] [-StickyHeader] [-PageSize <Int32>] [-PageSizeOptions <Int32[]>] [-PaginationLocation <String>] [-ShowSelection] [-ShowPagination] [-Padding <String>] [-Size <String>] [-TextOption <Hashtable>] [-ExportOption <String[]>] [-OnExport <Endpoint>] [-DisablePageSizeAll] [-DefaultSortDirection <String>] [-HideToggleAllRowsSelected] [-DisableMultiSelect] [-DisableSortRemove] [-Icon <Hashtable>] [-ClassName <String>] [-ShowRefresh] [-ToolbarContent <ScriptBlock>] [-OnRowExpand <ScriptBlock>] [-MaxHeight <Int32>] [-AutoRefresh] [-AutoRefreshInterval <Int32>] [-Language <String>] [-RemoveCard] [-OnRowStyle <ScriptBlock>] [-HeaderStyle <Hashtable>] [-InitialState <Hashtable>] [<CommonParameters>]

Description

Creates a table. Tables are used to show both static and dynamic data. You can define columns and data to show within the table. The columns can be used to render custom components based on row data. You can also enable paging, filtering, sorting and even server-side processing.

Parameters

-Id

The ID of the component. It defaults to a random GUID.

Required?                    false
Position?                    named
Default value                [Guid]::NewGuid().ToString()
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false

-Title

The title to show at the top of the table's card.

-Data <Object[]>

The data to put into the table.

-LoadRows

When using dynamic tables, this script block is called. The $Body parameter will contain a hashtable the following options:

-Columns <Hashtable[]>

Defines the columns to show within the table. Use New-UDTableColumn to define these columns. If this parameter isn't specified, the properties of the data that you pass in will become the columns.

-OnRowSelection

A script block to call when a row is selected. $EventData will contain the selected rows.

-PageSize

The default page size.

-PageSizeOptions <Int32[]>

An array of available page size options.

-PaginationLocation

Where to show the pagination controls. Valid values are top, bottom, or both. Defaults to bottom.

-Padding

-Size

The size of the table. Defaults to medium. Valid values are medium and small.

-TextOption

Customizations to standard text within the table. Use New-UDTextOption to create the text options.

-ExportOption <String[]>

An array of export options.

-OnExport

A script block used to customize how the export is performed.

-DefaultSortDirection

The default sort direction.

-Icon

Sets an icon next to the title. Use New-UDIcon to create the icon.

-ClassName

A CSS class to apply to the table.

-ToolbarContent

Custom content to show in the toolbar.

-OnRowExpand

A script block to call when a row is expanded. The $EventData variable will contain the row data.

-MaxHeight

-AutoRefreshInterval

The interval to reload data when AutoRefresh is specified.

-Language

The language. Primarily used for Date and Time filters.

-OnRowStyle

A script block to call to style rows. The $EventData variable will contain the row data.

-HeaderStyle

A hashtable of styles to apply to the header.

-InitialState

Outputs

-------------------------- EXAMPLE 1 --------------------------

Last updated

Was this helpful?