UDTable styling / options

Hey all,

Does anyone know if…

  • it’s possible to adjust the width of each column (individually) within a UDTable?
  • it’s possible to change the default number of rows to display (5,10,20)?
  • it’s possible to add/alter the dropdown values of 5,10,20 - i.e. make it 10,50,100?
  • it’s possible to adjust the text sizes, row heights etc?


Got something sorted…

  1. From PowerShell Universal | Components | Marketplace | Browse I found ‘UniversalDashboard.Style Easily create stylesheets on the fly.’
  2. I clicked ‘Install’ and waited, I then saw an error 400 modal display (error downloading?). I tried ‘Install-Module UniversalDashboard.Style’ in a PowerShell session on the server running PowerShell Universal too - maybe this worked? It downloaded the module.
  3. I grabbed the button styling example from https://marketplace.universaldashboard.io/Dashboard/UniversalDashboard.Style and added it to my dashboard script, it didn’t display
  4. I restarted Universal.Server - I’m running from IIS so stopped and started the website
  5. I logged back in to PowerShell Universal and at Components I now saw: UniversalDashboard.Style 1.0.0 C:\ProgramData\PowerShellUniversal\Dashboard\Components\UniversalDashboard.Style\1.0.0\UniversalDashboard.Style.psd1
  6. I stopped and started the dashboard, but the example button still didn’t display
  7. In the .ps1 script for the dashboard, I added: Import-Module ‘C:\ProgramData\PowerShellUniversal\Dashboard\Components\UniversalDashboard.Style\1.0.0\UniversalDashboard.Style.psm1’
  8. I stopped and started the dashboard, AND SUCCESS! the css styled button displays.
  9. I then wrapped by New-UDTable with a New-UDStyle like…
    New-UDStyle -Style '
        font-size: 11px;
	    .MuiTableCell-root {
	    padding: 0px;
    -Content {
        New-UDTable -Data $session:getroundcards -Columns $Columns -Sort -Export -Search

With the “.MuiTableCell-root” section enabling me to remove the padding from the table! yes!

So I just thought I’d reply with my experience in case it may help others out. It may have been an easy/basic challenge to achieve, but knowing to get UDStyle from the marketplace and then having to import that module wasn’t so clear. (The above may not be the best way to do this, if not please sing out)

Now I need to work out how to adjust the widths of each column individually :slight_smile:


And would it be possible to remove the footer (with rows per page options) and set the height / auto-height based upon number of rows. Just trying to get a single row/grid output.