-1

i want to change column width when i export my datatable with primefaces exporter - for example 5 columns - 35% 35% 10% 10% 10% width but there is no option for that, could someone please post a possibly workaround?

  • [This](https://stackoverflow.com/questions/32743148/primefaces-dataexporter-set-table-columns-width) might be what you are looking for. – Eritrean Mar 25 '19 at 11:09
  • i tried but it doesnt work: Nullpointer Exception - com.lowagie.text.pdf.PdfPTable.setWidths(Unknown Source) ~[itext-2.1.7.jar:?] – mrneedyourhelp Mar 25 '19 at 11:12

1 Answers1

0

This one worked for me. Create a custom style in a css file:

.column30 {
    width: 30px !important;
    max-width: 30px;
}

Then use the style in column

 <p:column headerText="example header" styleClass="column30">
mklepa
  • 211
  • 3
  • 7