Hi,
When I use UltraGridPrintDocument to print a grid the grid is printed inside a border (see attached image). Is there anyway to get rid of this?
It doesn't appear in the PDF when using UltraGridDocumentExporter, which is what I'm trying to achieve when printing.
Kind regards,
Nathan
That I didn't know! I'll bear it in mind for the future. Thanks again.
Hi Nathan,
Okay... but just be aware, you can already modify the PrintLayout to hide columns, expand rows or make other adjustments to the print layout without affecting the on-screen grid. You don't NEED to create a new grid just for that stuff. The only thing the print layout can't do without affecting the on-screen grid, in this case, is override the Style Library. :)
Hi Mike,
I've decided to have a completely separate grid for the print. I'm going to create a class to generate the grid and form on the fly, remove the styling, print then dispose of it. I do need to hide and resize some columns for the printed version, as well as force the child bands to expand anyway so it's probably best for me to keep them separate
If the client wants any particular formatting then I'll apply it through code.
The only real potential down-side to that approach is:
A) The printed grid will lose all styling. So none of the colors or other styling applied to the on-screen grid will be included in the print.
B) If the grid on-screen paints for any reason during the print, it will lose it's styling temporarily. I think this is unlikely since the print is a synchronous operation, but I could be wrong and it's certainly something to keep in mind.
Thanks for the quick response. Option 2 is a potential can of worms I think I'll steer well clear of.
I've turned off the app styling before print and turned it back on after and it works. Thank you very much.