When using datatable with grouping, I can't be able to set the width of a column.
Let's take the below example
http://www.primefaces.org/primeng/#/datatablegroup
If I want to change the width for any of the column, how would I do that? I added inline style on p-column but that doesn't seems to be working. Please suggest
DateTable- Unable to set width of a column with Grouping
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
For example to increase brand column width;
Code: Select all
this.headerRows = [
{
columns: [
{header: 'Brand', rowspan: 3, style:'width:300px'},
{header: 'Sale Rate', colspan: 4}
]
},
{
columns: [
{header: 'Brand', colspan: 2},
{header: 'Sale Rate', colspan: 2}
]
},
{
columns: [
{header: 'Last Year'},
{header: 'This Year'},
{header: 'Last Year'},
{header: 'This Year'}
]
}
];
-
- Posts: 35
- Joined: 22 Apr 2016, 23:22
Yes, that works. But what if we want to set the width of the column those are in group. Like if we need to give more width to the Last Year column, how that could be done?
Also, can you please mention what properties we can pass to the column definition array? where to find it's detail?
Also, can you please mention what properties we can pass to the column definition array? where to find it's detail?
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
-
- Posts: 35
- Joined: 22 Apr 2016, 23:22
Please let me know how to set style when setting in code like above with Angular RC 1 inline style breaking change in primeng?
-
- Information
-
Who is online
Users browsing this forum: No registered users and 25 guests