Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ui-grid: How do I set column width when using pdf export

How can I set column widths when exporting pdf using ui-grid. Pdfmake has width as an option however the ui-grid exporter api docs don't have this option anywhere.

Thanks for the help

like image 788
ralphowino Avatar asked Jul 16 '26 10:07

ralphowino


1 Answers

After a bit more fiddling with the source code, discovered that the width is retrieved from the gridoptions.columnsDef.width value. Here is the link to the docs http://ui-grid.info/docs/#/api/ui.grid.class:GridOptions.columnDef

like image 55
ralphowino Avatar answered Jul 19 '26 05:07

ralphowino



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!