Pre-Selecting Rows on UDTable

Pre-Selecting Rows on UDTable

avatar
(anonymous user)
Product: PowerShell Universal
Version: 4.5.6


I have a table created with New-UDTable and I’m using the -OnRowSelection parameter. Is there any way I can programmatically select a row? i.e. load the table with certain rows already selected. So far it would seem to be not possible.

Thanks!

All Comments (3)

avatar

Also not sure if it’s possible, but I’d look at using Get-UDElement and then Set-UDElement to see if you can manipulate the SelectedRows property.

avatar

Thanks! I did take a look at it, if it’s possible I didn’t figure it out. I’ve bodged around it using a New-UDCheckbox in the table row which I can control programmatically.

avatar

OnRowSelection will be raised AFTER the end user selects rows. You want to PRESELECT rows. Not a common request… where you know what to select before the end user. I think you want to ask/request for an AfterLoad event. Once data is retrieved to display, give you options to customize the grid before its displayed. Not a bad request.