Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1220
exporting grid to pdf using UltraWebGridDocumentExporter
posted

Hello, 

i am testing this pdf exporting method, and it is really great that it exists. Right out of the box my exported grid looks terrible in pdf because on the web it is styled using css, but that i can change if i can get this to work. 

I have 2 questions 

1. for some reason the frame around the grid is not extended to full page. So the exported grid in pdf, takes up 50% of page horizontally. The grid.width and  grid.displaylayout.frame.width is not set (but i tried setting it to different widths and it isnt having any impact). how can i get the grid frame to expand onto the whole pdf page?

2. How can i apply column formatting, to show the numbers in red if they are negative? Currently i add the following in column definition: Format="#,###,###,##0.00000000;<span class=red>(#,###,###,##0.00000000)</span>". as you can guess, in negative instance it just writes out the <span...> to the PDF so this only works on the web. 

thanks.