Product: PowerShell Universal
Version: 3.8.8
Hi,
I have this code, that allows me to export the colums into PDF, Excel, etc for testing purposes
$TestArray = @()
1..5 | ForEach-Object {
$TestArray += [PSCustomObject]@{
ID = $_
Client = "Computer-$(Get-Random)"
LastUpdated = Get-date
}
}
New-UDDashboard -Title 'All clients' -Content {
New-UDGrid -Container -Content {
New-UDGrid -Item -ExtraSmallSize 6 -Content {
$Columns = @(
New-UDTableColumn -Property ID -Title "ID" -Hidden
New-UDTableColumn -Property Client -Title "Client Name" -ShowFilter -ShowSort -IncludeInExport
New-UDTableColumn -Property LastUpdated -Title "Last Updated" -ShowFilter -ShowSort -IncludeInExport -FilterType date
New-UDTableColumn -Property ClientButton -Title "View" -Render {
New-UDButton -Text "View" -OnClick {
Show-UDToast -Message $eventdata.ID
$Page:TestDynamic = $eventdata.ID
Sync-UDElement -Id 'ClientIDSelection'
}
}
)
New-UDTable -Data $TestArray -Columns $Columns -ShowSort -ShowFilter -PageSize 5 -ShowPagination -Dense -ShowRefresh -ShowExport
}
}
New-UDDynamic -Id 'ClientIDSelection' -Content {
if ($Page:TestDynamic) {
New-UDCard -Title "Test123" -Content {
New-UDTypography -Text $Page:TestDynamic
}
}
}
}
Isnt there an option to include all columns in the export by default, instead of having to specify the -IncludeInExport parameter?