PSU 2026.1.2
I'm looking for a way to pop up additional information when clicking on a row (not selecting a row) in a UDTable. I know there's the expand row option, which opens an expand box below the row and there's the option of adding a custom button, but I was hoping there was a way to support clicking on the row and it could then support a code block (in my case, likely open a modal with the extended details of the row item).
For instance, the table would have like
New-UDTable -LoadData {
$Data } -Columns @(
New-UDTableColumn -IncludeInExport -Id Id -Property Id -Title "Id" -Width 50
New-UDTableColumn -IncludeInExport -Id ServerName -Property ServerName -Title "Server Name" -Width 150
New-UDTableColumn -IncludeInExport -Id CPUS -Property CPUS -Title "CPUs"
New-UDTableColumn -IncludeInExport -Id Memory_GB -Property Memory_GB -Title "Memory (GB)"
New-UDTableColumn -IncludeInExport -Id OperatingSystem -Property OperatingSystem -Title "Operating System" -Width 100
) -OnRowClick {
Show-UDModal -Persistent -FullWidth -Content {
New-UDCard -Content {
New-UDGridLayout -Content {
$VMData = Invoke-PSUEndpoint -Integrated -Url "/api/v1/VM/$($EventData.Id)" | ConvertFrom-Json
New-UDTextbox -Id 'Id' -Label 'Id' -Value $EventData.Id -Disabled
New-UDTextbox -Id 'ComputerName' -Label 'ComputerName' -Value $EventData.ServerName -Disabled
New-UDTextbox -Id 'Department' -Label 'Department' -Value $VMData.Department -Disabled
New-UDTextbox -Id 'Owner' -Label 'Owner' -Value $VMData.Owner -Disabled
New-UDTextbox -Id 'State' -Label 'State' -Value $VMData.State -Disabled
}
}
}
}And then when clicked on, it would display a bunch of additional information, like power state, health of tracked services, drives, other internal server tracking values that bloat the original table well beyond the width of the screen.
I know this could probably be done in an expand, but it requires you click on the dropdown button rather than just the row itself (and frankly looks ugly compared to a popup modal / so I'd just do a details button at that point), so I was hoping someone might have an idea or way to accomplish what I'm looking for as an on row click (anywhere in the row preferably).
Hello @SunnyJ
Thank you for the detailed example. I understand what you are looking for: clicking anywhere on a table row and using that row's data to trigger an action, such as opening a modal, without relying on row selection, the expand control, or a separate details button.
I am going to validate the available New-UDTable event handling specifically against PSU 2026.1.2. The currently documented table patterns include row selection and row expansion, but I have not found a verified native OnRowClick equivalent yet.
Before treating this as a feature request, I would like to confirm whether there is an existing supported approach that can provide the same behavior while still giving access to the clicked row through $EventData.
I will follow up with the result of that validation.
Best regards,
Ruben Tapia
I do this myself but personally just have an extra column with a button on it that opens a model and it serves my purposes.
I would love to see proper support for clicking a row. Even if it relied on the row selection feature, and clicking anywhere on the row marked the row as selected. From that you can use -OnRowSelection. Haven't yet tried hacking around with custom classes, but I'd be quite sure it can be implemented via a workaround without actually requiring a change to the PSU codebase.
Hello SunnyJ,
I validated this directly in PSU 2026.1.2.
New-UDTable does not expose an -OnRowClick parameter in this version. I also tested the interaction behavior with a minimal table:
- Using -ShowSelection with -OnRowSelection works as expected. Selecting the checkbox triggers the event and can be used to open a modal with the selected row data.
- Clicking normally on the row or on a regular table cell does not select the row and does not trigger -OnRowSelection.
So the exact behavior you are looking for, where clicking anywhere on the row invokes an action, is not available natively through New-UDTable in PSU 2026.1.2.
At the moment, the supported alternatives are using the explicit row selection mechanism or implementing a dedicated action within the row, such as a Details button.
Since the full-row click behavior would be a useful UX option and is distinct from the existing selection behavior, this would be appropriate to consider as a Feature Request if you would like to pursue it.
Best regards,
Ruben Tapia
Thanks for the follow up Ruben. I have submitted a feature request on that forum: OnRowClick for Tables - Devolutions Forum