New-UDDataGrid
Synopsis
Displays data in a table-style grid.
Syntax
New-UDDataGrid [[-Id] <String>] [[-Columns] <Hashtable[]>] [[-LoadRows] <Endpoint>] [[-Height] <String>] [[-AutoHeight] <Boolean>] [-AutoPageSize] [-CheckboxSelection] [-CheckboxSelectionVisibleOnly] [[-ColumnBuffer] <Int32>] [[-ColumnThreshold] <Int32>] [[-Density] <String>] [[-PageSize] <Int32>] [[-RowsPerPageOptions] <Int32[]>] [-ShowPagination] [[-OnSelectionChange] <Endpoint>] [[-Language] <String>] [[-LoadDetailContent] <Endpoint>] [[-DetailHeight] <String>] [[-OnEdit] <Endpoint>] [[-OnExport] <Endpoint>] [-ShowQuickFilter] [[-DefaultSortColumn] <String>] [[-DefaultSortDirection] <String>] [-DisableRowSelectionOnClick] [-HideExport] [[-RowHeight] <Int32>] [[-IdentityColumn] <String>] [-StripedRows] [-HeaderFilters] [-AutoSizeColumns] [[-ExportOptions] <String[]>] [<CommonParameters>]Description
Displays data in a table-style grid. Provides support for sorting, paging, and filtering of large data sets.
Parameters
-Id
The ID of this data grid.
Required? false
Position? 1
Default value [Guid]::NewGuid()
Accept pipeline input? false
Aliases
Accept wildcard characters? false-Columns <Hashtable[]>
An array of column to display in this table.
-LoadRows
The script block that loads the data for this grid.
-Height
The static height for this data grid.
-AutoHeight
Whether to calculate the height of this data grid.
-AutoPageSize
Automatically determines the page size.
-CheckboxSelection
Checkbox selection for rows.
-CheckboxSelectionVisibleOnly
Parameter description
-ColumnBuffer
Parameter description
-ColumnThreshold
-Density
The visible density of the table.
-PageSize
The default page size.
-RowsPerPageOptions <Int32[]>
An array of page sizes.
-ShowPagination
Whether to show Pagination.
-OnSelectionChange
-Language
The language to use for text in the data grid.
-LoadDetailContent
A script block that is called when rows are expanded. $EventData will contain the row's data.
-DetailHeight
The static height of the detail pane.
-OnEdit
A script block that is called when the row is edited. $EventData will include the edited data. Return an object to update the data grid row.
-OnExport
A script block that is called when data is exported.
-ShowQuickFilter
Shows a quick filter (search) box.
-DefaultSortColumn
The default column to sort by.
-DefaultSortDirection
The default sort direction.
-DisableRowSelectionOnClick
Disables row selection on click.
-HideExport
Hides the export button.
-RowHeight
The height of the rows.
-IdentityColumn
The identity column for the data grid.
-StripedRows
Whether to use striped row colors.
-HeaderFilters
Whether to show filters in the column headers.
-AutoSizeColumns
Automatically size columns.
-ExportOptions <String[]>
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: Basic data grid
Creates a basic data grid with columns.
Example 2
Example 3: Render
Adds support for custom rendering of columns.
Example 4: Detailed Content
Adds support for detailed content.
Example 5: Editing
Adds support for editing rows.
Example 6
Column Options|
Example 7: Selection
Adds support for row selection.
Last updated
Was this helpful?