Skip to content

New-HTMLTable -HideButtons #114

@xlrod

Description

@xlrod

Good afternoon,

I'm not sure if this was already implemented and I just didn't find the option, but here is a way to hide all the buttons from the DataTable.

Added a switch parameter to the New-HTMLTable, -HideButtons.
I was going to use the code from the DataTables site buttons().disable(), but just added the switch to only add the buttons to the $Options hash if it's $False.

$Table = Get-Process | Select-Object -First 4

New-HTML -TitleText "Testing HideButtons" -FilePath "$PSScriptRoot\Test-HideButtons.html"  {
    # Hide
    New-HTMLSection -HeaderText "Hide Buttons" -Content {
        New-HTMLTable -DataTable $Table -HideButtons
    }
    # Show
    New-HTMLSection -HeaderText "Show Buttons" -Content {
        New-HTMLTable -DataTable $Table
    }
}

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions