New-UDGridLayout - can't place items below others

I used the sample code for New-UDGridLayout, and I can arrange the cards horizontally but not vertically as the cards overlap.

$Dashboard = New-UDDashboard -Title “New-UDGridLayout” -Content {
New-UDGridLayout -Content {
New-UDCard -Title “Card 1” -Id ‘Card1’
New-UDCard -Title “Card 2” -Id ‘Card2’
New-UDCard -Title “Card 3” -Id ‘Card3’
}
}
Get-UDDashboard | Stop-UDDashboard

Start-UDDashboard -Dashboard $Dashboard -Port 10003 -Design

Start-Process “http://localhost:10003

What am I doing wrong, or is this a bug?

image

Hello @davidcrook you need to use the -draggable and -resizable parameters…
Check out this awesome video @adam did here:-

Thank you. I added the -draggable and -resizable parameters and have the same behavior. I can arrange horizontally but not vertically without overlapping.

$Dashboard = New-UDDashboard -Title “New-UDGridLayout” -Content {
New-UDGridLayout -Content {
New-UDCard -Title “Card 1” -Id ‘Card1’
New-UDCard -Title “Card 2” -Id ‘Card2’
New-UDCard -Title “Card 3” -Id ‘Card3’
} -Draggable -Resizable
}
Get-UDDashboard | Stop-UDDashboard

Start-UDDashboard -Dashboard $Dashboard -Port 10003 -Design -Force

Start-Process “http://localhost:10003

You are using the paid for version yeah? On iPhone atm so cannot test your code sadly. Will test tomorrow had enough of working on laptop tonight been a long week man :roll_eyes:
Just to confirm you watched the YouTube vid I posted as your not specifying the -layout parameter with the json code that actually positions the components correctly on the page

You might need to stretch the size of the controls. Grab this handle.

image

And drag it down.

image

That was the problem! I just needed to resize the controls downwards. Thank you!

1 Like