-
-
Save McAndersDK/5749f64e47c723a3f278550da53736cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New-UDGrid -Title 'Grid' -Id 'GridId' -Endpoint { | |
#$data = Import-Clixml loaddata.xml | |
$Data = New-Object pscustomobject -Property @{ | |
'ItemColumn' = 'Value' | |
} | |
$ColumnActions = @{n = "Actions"; e = { New-UDButton -Id "$($_.ItemColumn)Delete" -Text 'Delete' -OnClick { | |
$Clickeditem = $_.ItemColumn | |
(Import-Clixml loaddata.xml | Where-Object ItemColumn -ne $Clickeditem ) | Export-Clixml loaddata.xml | |
Sync-UDElement -id 'GridId' -broadcast | |
} | |
} | |
} | |
$Data | Select-Object 'ItemColumn', $ColumnActions | Out-UDGridData | |
} -Headers @('ItemColumn', 'Actions') -Properties @('ItemColumn', 'Actions') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment