I’m trying to create something like a comparison matrix with checkmarks that correspond to boolean values. Currently I’m using images of checkmarks to fill in the true values, but this is memory intensive and there are scaling problems. Is there a way to use New-UDIcon as a property value on a UDGrid object? I tried something like this but the values were blank:
[PSCustomObject]@{Property1 = $null; $Property2 = New-UDIcon -Icon Check}
Thanks!
P.S. I’m finally getting to build a production app with UD, so expect questions
adam
January 10, 2019, 5:25pm
2
Wooo! Excited to see what you come up with
And this works for me.
$Dashboard = New-UDDashboard -Content {
New-UDGrid -Title "Test" -Headers @("Property1", "Property2") -Properties @("Property1", "Property2") -Endpoint {
$Item = @()
$Item += [PSCustomObject]@{Property1 = $null; Property2 = New-UDIcon -Icon Check}
$Item += [PSCustomObject]@{Property1 = $null; Property2 = New-UDIcon -Icon Check}
$Item += [PSCustomObject]@{Property1 = $null; Property2 = New-UDIcon -Icon Check}
$Item | Out-UDGridData
}
}
Start-UDDashboard -Port 10001 -Dashboard $Dashboard
Hmm… not sure what I did wrong then. I’ll keep trying.
adam
January 10, 2019, 7:05pm
5
Interesting. What browser?
Chrome. UD version 2.2.0 and Powershell 5.1
adam
January 10, 2019, 8:52pm
7
Can you pop open the developer tools (F12) and send me a screen shot of the errors?
Ugh! Can’t brain today!
On my actual dashboard I’m using the -Color parameter to try to get green checkmarks. I tested again without this parameter and it worked!
adam
January 10, 2019, 9:14pm
9
Sounds like a bug! Can you file a GitHub issue pls?