New-UDElement in a Grid?

Hey Guys, question around New-UDElement inside a UDGrid?, currently trying to set the color status of a service which works with UDTable, but similar doesn’t work with Grid.

The error thats being thrown is b.hasOwnProperty is not a function,

-thanks

I think it has to do with setting a style on the element (like a color). It’s the same issue as this: https://github.com/ironmansoftware/universal-dashboard/issues/549

1 Like

Yeah @adam looks like the same issue, is this in the pipeline for 2.3? thanks

Yes.

Super!, have a great use case for displaying some db info, with the nice filter on the UDGrid component.

Thank you for this post, been racking my brain for a few days getting colors to work in New-UdGrid

This did not work …
New-UDElement -Tag ‘div’ -Attributes @{ style = @{ ‘backgroundColor’ = $BackgroundColor; color = ForegroundColor } } -Content { _.state }

This Works …
New-UDElement -Tag ‘div’ -Attributes @{ className = “orange white-text” } -Content { $_.state }

1 Like

Update, this works in UniversalDashboard.Community Version 2.2.0 - 2.3.2 but not in Version 2.4.0 and above.