Hi,
Here's an example:
https://stackblitz.com/edit/github-5vfjwy
I'm wondering how, if it's possible, to specify column width when using column groups (colspan). The example I linked above shows a use-case.
I can set the width of the columns in the scrollable table body, but the headers (which I see are a separate table element) always have an even split of width for columns as long as there is another column that is spanning.
I can see that the first example would work if the table were not set to fixed layout, but the scrollable one still doesn't line up well.
scrollable p-table column width when using colspan
-
- Posts: 449
- Joined: 08 Aug 2018, 14:09
Hi,Space wrote: ↑21 Feb 2019, 00:49Hi,
Here's an example:
https://stackblitz.com/edit/github-5vfjwy
I'm wondering how, if it's possible, to specify column width when using column groups (colspan). The example I linked above shows a use-case.
I can set the width of the columns in the scrollable table body, but the headers (which I see are a separate table element) always have an even split of width for columns as long as there is another column that is spanning.
I can see that the first example would work if the table were not set to fixed layout, but the scrollable one still doesn't line up well.
It's seems to be bug. You can create ticket in https://github.com/primefaces/primeng/issues .
Best Regards.
Actually, while submitting this issue the github "related issues" beta showed me this:
https://github.com/primefaces/primeng/issues/4927
and using the colgroup solution that cagatay posted in that issue, I was able to get my issue fixed. So it works as long as I use the colgroup template.
Thanks!
https://github.com/primefaces/primeng/issues/4927
and using the colgroup solution that cagatay posted in that issue, I was able to get my issue fixed. So it works as long as I use the colgroup template.
Thanks!
-
- Posts: 449
- Joined: 08 Aug 2018, 14:09
Glad to hear!Space wrote: ↑21 Feb 2019, 22:04Actually, while submitting this issue the github "related issues" beta showed me this:
https://github.com/primefaces/primeng/issues/4927
and using the colgroup solution that cagatay posted in that issue, I was able to get my issue fixed. So it works as long as I use the colgroup template.
Thanks!
-
- Posts: 1
- Joined: 26 Nov 2021, 17:16
Migrated from primeng 11 to primeng 12 and the widths of columns were not adjustable anymore (the same width were applied to all of them).yigitfindikli wrote: ↑22 Feb 2019, 12:45Glad to hear!Space wrote: ↑21 Feb 2019, 22:04Actually, while submitting this issue the github "related issues" beta showed me this:
https://github.com/primefaces/primeng/issues/4927
and using the colgroup solution that cagatay posted in that issue, I was able to get my issue fixed. So it works as long as I use the colgroup template.
Thanks!
I had to change from
Code: Select all
[style]="{'width': col.width}"
Code: Select all
[style]="{'max-width': col.width}"
-
- Information
-
Who is online
Users browsing this forum: No registered users and 4 guests