Hi all,
I have a main grid which brings back a set of data and adds a ‘Details’ button. When the user clicks the details button, a modal form is shown with a grid with more information. This is working well.
However I have an issue where if the user clicks off the modal form, then clicks details on another record, the more information grid does not get refreshed and still shows the data from the 1st record.
Any ideas? Thanks
Invoke-Sqlcmd2 @SQLticketParams | ForEach-Object {
[PSCustomObject]@{
#ID = $_.ID
SiteCode = $_.SiteCode
RegistrationCode = $_.RegistrationCode
TransactionDate = $_.TransactionDate
TransactionNo = $_.TransactionNo
SequenceCode = $_.SequenceCode
Resend = New-UDButton -Text "Details" -onclick {
Show-UDModal -Width '98%' -Content {
New-UDButton -Text "Replay" -OnClick {
Replay-Weighticket -TransactionNo $_.TransactionNo -TransactionID $_.ID -sitecode $_.SiteCode
Show-UDToast -Message "Replayed $($_.TransactionNo)" -Duration 10000
}
New-UDGrid -id 'auditdetailgrid' -Title "Showing audit details for $($_.TransactionNo)" -AutoRefresh -RefreshInterval 300 -PageSize 50 -Endpoint {
Get-WeighticketAudit -TransactionNo $_.TransactionNo | Out-UDGridData
}
}
}
}
} | Out-UDGridData