> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/de/powershell-befehle/new-uddatagrid.md).

# New-UDDataGrid

### Übersicht

Zeigt Daten in einem Raster im Tabellenstil an.

### Syntax

```powershell
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>]
```

### Beschreibung

Zeigt Daten in einem Raster im Tabellenstil an. Bietet Unterstützung für das Sortieren, Paginieren und Filtern großer Datensätze.

### Parameter

#### -Id

Die ID dieses Datenrasters.

```
Required?                    false
Position?                    1
Default value                [Guid]::NewGuid()
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Columns \<Hashtable\[]>

Ein Array von Spalten, die in dieser Tabelle angezeigt werden.

```
Required?                    false
Position?                    2
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -LoadRows

Der Skriptblock, der die Daten für dieses Raster lädt.

```
Required?                    false
Position?                    3
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Height

Die statische Höhe für dieses Datenraster.

```
Required?                    false
Position?                    4
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -AutoHeight

Ob die Höhe dieses Datenrasters berechnet werden soll.

```
Required?                    false
Position?                    5
Default value                True
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false

    -AutoPageSize [<SwitchParameter>]
        Automatically determines the page size.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false

    -CheckboxSelection [<SwitchParameter>]
        Checkbox selection for rows.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false

    -CheckboxSelectionVisibleOnly [<SwitchParameter>]
        Parameter description

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -ColumnBuffer

Parameterbeschreibung

```
Required?                    false
Position?                    6
Default value                3
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -ColumnThreshold

```
Required?                    false
Position?                    7
Default value                3
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Density

Die sichtbare Dichte der Tabelle.

```
Required?                    false
Position?                    8
Default value                standard
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -PageSize

Die Standard-Seitengröße.

```
Required?                    false
Position?                    9
Default value                5
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -RowsPerPageOptions \<Int32\[]>

Ein Array von Seitengrößen.

```
Required?                    false
Position?                    10
Default value                @(5, 10, 25)
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false

    -ShowPagination [<SwitchParameter>]
        Whether to show Pagination.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -OnSelectionChange

```
Required?                    false
Position?                    11
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Language

Die Sprache, die für Text im Datenraster verwendet wird.

```
Required?                    false
Position?                    12
Default value                en-US
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -LoadDetailContent

Ein Skriptblock, der aufgerufen wird, wenn Zeilen erweitert werden. $EventData enthält die Daten der Zeile.

```
Required?                    false
Position?                    13
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -DetailHeight

Die statische Höhe des Detailbereichs.

```
Required?                    false
Position?                    14
Default value                auto
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -OnEdit

Ein Skriptblock, der aufgerufen wird, wenn die Zeile bearbeitet wird. $EventData enthält die bearbeiteten Daten. Geben Sie ein Objekt zurück, um die Zeile des Datenrasters zu aktualisieren.

```
Required?                    false
Position?                    15
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -OnExport

Ein Skriptblock, der aufgerufen wird, wenn Daten exportiert werden.

```
Required?                    false
Position?                    16
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false

    -ShowQuickFilter [<SwitchParameter>]
        Shows a quick filter (search) box.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -DefaultSortColumn

Die Standardspalte, nach der sortiert wird.

```
Required?                    false
Position?                    17
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -DefaultSortDirection

Die Standard-Sortierrichtung.

```
Required?                    false
Position?                    18
Default value                asc
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false

    -DisableRowSelectionOnClick [<SwitchParameter>]
        Disables row selection on click.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false

    -HideExport [<SwitchParameter>]
        Hides the export button.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -RowHeight

Die Höhe der Zeilen.

```
Required?                    false
Position?                    19
Default value                -1
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -IdentityColumn

Die Identitätsspalte für das Datenraster.

```
Required?                    false
Position?                    20
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false

    -StripedRows [<SwitchParameter>]
        Whether to use striped row colors.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false

    -HeaderFilters [<SwitchParameter>]
        Whether to show filters in the column headers.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false

    -AutoSizeColumns [<SwitchParameter>]
        Automatically size columns.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -ExportOptions \<String\[]>

```
Required?                    false
Position?                    21
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false

    <CommonParameters>
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer, PipelineVariable, and OutVariable. For more information, see
        about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
```

### Ausgaben

\-------------------------- EXAMPLE 1 --------------------------

```
PS >New-UDDataGrid -LoadRows {
PS >     $Data = @(
PS >         @{ Name = 'Adam'; Number = Get-Random}
PS >         @{ Name = 'Tom'; Number = Get-Random}
PS >         @{ Name = 'Sarah'; Number = Get-Random}
PS >     )
PS >     @{
PS >         rows = $Data
PS >         rowCount = $Data.Length
PS >     }
PS > } -Columns @(
PS >     New-UDDataGridColumn -Field 'Name'
PS >     New-UDDataGridColumn -Field 'Number'
PS > ) -Id 'dataGrid1'

Basic data grid|Creates a basic data grid with columns.




-------------------------- EXAMPLE 2 --------------------------

PS >New-UDDataGrid -LoadRows {
PS >     $Data = 1..1000 | ForEach-Object {
PS >         @{ Name = "User$($_)"; Number = Get-Random }
PS >     }
PS >     Out-UDDataGridData -Data $Data -Total $Data.Length -Context $EventData
PS > } -Columns @(
PS >     New-UDDataGridColumn -Field 'Name'
PS >     New-UDDataGridColumn -Field 'Number'
PS > ) -Pagination -Id 'dataGrid2'

Out-UDDataGridData|Adds support for filtering, sorting, and paging.




-------------------------- EXAMPLE 3 --------------------------

PS >New-UDDataGrid -LoadRows {
PS >     $Data = 1..100 | % {
PS >         @{ Name = 'Adam'; Number = Get-Random}
PS >     }
PS >     Out-UDDataGridData -Data $Data -Total $Data.Length -Context $EventData
PS >
PS > } -Columns @(
PS >     New-UDDataGridColumn -Field 'Name' -Render {
PS >         New-UDAlert -Text $EventData.Name -Dense
PS >     }
PS >     New-UDDataGridColumn -Field 'Number'
PS > ) -Pagination -Id 'dataGrid3'

Render|Adds support for custom rendering of columns.




-------------------------- EXAMPLE 4 --------------------------

PS >New-UDDataGrid -LoadRows {
PS >     $Data = @(
PS >         @{ Name = 'Adam'; Number = Get-Random }
PS >         @{ Name = 'Tom'; Number = Get-Random }
PS >         @{ Name = 'Sarah'; Number = Get-Random }
PS >     )
PS >     @{
PS >         rows     = $Data
PS >         rowCount = $Data.Length
PS >     }
PS > } -Columns @(
PS >     New-UDDataGridColumn -Field 'Name'
PS >     New-UDDataGridColumn -Field 'Number'
PS > ) -LoadDetailContent {
PS >     New-UDAlert -Text $EventData.row.Name
PS > } -Id 'dataGrid4'

Detailed Content|Adds support for detailed content.




-------------------------- EXAMPLE 5 --------------------------

PS >$Cache:Data = @(
PS >     @{ Name = 'Adam'; number = Get-Random }
PS >     @{ Name = 'Tom'; number = Get-Random }
PS >     @{ Name = 'Sarah'; number = Get-Random }
PS > )
PS > New-UDDataGrid -LoadRows {
PS >     $Cache:Data| Out-UDDataGridData -Context $EventData -TotalRows $Cache:Data.Length
PS > } -Columns @(
PS >     New-UDDataGridColumn -Field name -Render {
PS >         New-UDButton -Text $EventData.number
PS >     }
PS >     New-UDDataGridColumn -Field number -Editable
PS > ) -AutoHeight $true -OnEdit {
PS >     $Cache:Data | Where-Object { $_.Name -eq $EventData.NewRow.Name } | ForEach-Object {
PS >         $_.Number = $EventData.NewRow.Number
PS >     }
PS > } -Id 'datagrid5'

Editing|Adds support for editing rows.




-------------------------- EXAMPLE 6 --------------------------

PS >New-UDDataGrid -LoadRows {
PS >     $Data = @(
PS >         @{ Name = 'Adam'; number = Get-Random }
PS >         @{ Name = 'Tom'; number = Get-Random }
PS >         @{ Name = 'Sarah'; number = Get-Random }
PS >     )
PS >     @{
PS >         rows     = $Data
PS >         rowCount = $Data.Length
PS >     }
PS > } -Columns @(
PS >     New-UDDataGridColumn -Field 'Name' -HeaderName 'A Name' -Flex 1 -HeaderAlign 'center' -Align 'center' -DisableColumnMenu
PS >     New-UDDataGridColumn -Field 'Number' -HeaderName 'A Number' -Flex 1 -HeaderAlign 'right' -Align 'right' -DisableColumnMenu
PS > ) -Id 'dataGrid6'

Column Options|




-------------------------- EXAMPLE 7 --------------------------

PS >New-UDDataGrid -LoadRows {
PS >     $Data = @(
PS >         @{ Id = 1; Name = 'Adam'; number = Get-Random }
PS >         @{ Id = 2; Name = 'Tom'; number = Get-Random }
PS >         @{ Id = 3; Name = 'Sarah'; number = Get-Random }
PS >     )
PS >     @{
PS >         rows     = $Data
PS >         rowCount = $Data.Length
PS >     }
PS > } -Columns @(
PS >     New-UDDataGridColumn -Field 'Name' -HeaderName 'A Name' -Flex 1 -HeaderAlign 'center' -Align 'center' -DisableColumnMenu
PS >     New-UDDataGridColumn -Field 'Number' -HeaderName 'A Number' -Flex 1 -HeaderAlign 'right' -Align 'right' -DisableColumnMenu
PS > ) -Id 'dataGrid7' -CheckboxSelection -CheckboxSelectionVisibleOnly -DisableRowSelectionOnClick

Selection| Adds support for row selection.
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell-universal/de/powershell-befehle/new-uddatagrid.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
