Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I need help with New-HTMLTable and New-TableRowGrouping #269

Open
gglgiggles opened this issue Aug 24, 2021 Discussed in #266 · 3 comments
Open

I need help with New-HTMLTable and New-TableRowGrouping #269

gglgiggles opened this issue Aug 24, 2021 Discussed in #266 · 3 comments
Labels
enhancement New feature or request

Comments

@gglgiggles
Copy link

Discussed in #266

Originally posted by gglgiggles August 19, 2021
I have the following code that almost looks like I want.

New-HTML -TitleText $Title -Online -FilePath $PSScriptRoot\qualifiers.htm -Temporary {
New-HTMLSection -HeaderText 'Source fields For Qualified Converts' {
    New-HTMLTable -DataTable $qualified -HideFooter -PagingStyle full_numbers  -DisableOrdering -DisableAutoWidthOptimization {
        New-HTMLTableColumnOption -ColumnIndex 0 -Hidden $true
        New-HTMLTableColumnOption -ColumnIndex 1 -Width 20
        New-HTMLTableColumnOption -ColumnIndex 2 -Width 20
        New-HTMLTableColumnOption -ColumnIndex 3 -Width 20
        New-HTMLTableColumnOption -ColumnIndex 4 -Width 100
        New-HTMLTableColumnOption -ColumnIndex 5 -Width 10
        New-TableRowGrouping -Name 'client' -Color black -BackgroundColor LightBlue
    }
}
} -ShowHTML

Issue 1: When run, I get the groups but would like them all to be collapsed

image

Issue 2: ColumnIndex 5 can be lengthy and I would like to force this off of the main screen and into something that can be clicked to be shown and have it wrapped as above. The only way, I was able to do that was to EnableScroller, but then the data is not wrapped.

image

@PrzemyslawKlys
Copy link
Member

I am not sure if this is possible:

  1. Some docs for row grouping -> https://datatables.net/examples/advanced_init/row_grouping.html - not everything is implemented what is possible
  2. You can force some columns to be originally hidden
New-TableHeader -ResponsiveOperations none -Names 'GPONames', 'Objects'

But I don't know if it will work with row grouping.

@gglgiggles
Copy link
Author

Have had a chance to look at the documentation for the row grouping but for issue 2, the above did the trick. Thanks

@PrzemyslawKlys PrzemyslawKlys added the enhancement New feature or request label Sep 22, 2021
@raoue
Copy link

raoue commented Mar 4, 2022

Worked with Row Grouping, even the Grouping Column specified was added as one of the Columns initially hidden but the Group Row still shows that Column's data, excellent!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants