Is it possible to make items in a UDTable clickable? For example, I’d like to make the ‘Name’ column in the following picture take me to a new UD Page when clicked:
I have a feeling this can be done with UDElements, but I can’t find much in the way of documentation for these
Thanks in advance
psott
December 18, 2018, 12:52pm
3
New-UDLink can do this:
New-UDTable -Title "Server Information" -Headers @("Severity", "Name",'Affected Hosts') -Endpoint {
1..10 | foreach {
[pscustomobject]@{
Severity = 'CRITICAL'
Name = New-UDLink -Text 'KB123456' -Url "localhost\kb123456"
'Affected Hosts' = '123'
}
}| Out-UDTableData -Property @("Severity", "Name",'Affected Hosts')
}
1 Like
I like that a lot better, actually, thanks @psott
Would it be possible to have those links open a new card or other element instead? I’d like users to click on a user or mailbox in table and pull up a window where they can edit details without jumping to another page
psott
December 29, 2018, 7:27am
6
Should be possible. I have no computer right now to test it, but this thread should help:
Hi,
I have a table, in that table each row has a button calling a Show-Udmodal.
The code for the button and Modal is added through a Select Expression on a get-ADUser, and basically i’m looking for a way to have a modal display info based on the user in the row where the button is clicked.
I’ve tried something like below, but once displayed the Header and card title is blank.
Has anyone done anything similar?
@{Name="DetailsModal";Expression={
…
psott
December 30, 2018, 5:46pm
7
Here is a working example of a modal popup inside a grid
Get-UDDashboard | Stop-UDDashboard
$pages = @()
$pages += New-UDPage -Name "home" -Content {
New-UDTable -Title "Information" -Headers @("Name", "Action") -Endpoint {
1..10 | foreach {
[pscustomobject]@{
Name = 'something'
Action = New-UDButton -Text "Click" -OnClick {
Show-UDModal -Header {New-UDHeading -Size 4 -Text 'Modal Heading'} -Content {
New-UDCard -Title 'Modal Title' -Size large -Content {
"content of card $_"
}
}
}
}
} | Out-UDTableData -Property @("Name", "Action")
}
}
$Dashboard = New-UDDashboard -Title 'test' -Page $pages
Start-UDDashboard -Port 10001 -Dashboard $Dashboard
2 Likes