Hi,
How do I can keep exacly the same grid layout (rows, columns width and height, Font, colors...) as my original grid display on my window form using UltraGridDocumentExporter and the Export(grid, Section) methode? Something likes the UtlraGridPrintDocument (grid.PrintPreview();) does with de layout.
With this code example my columns are smaller than the real grid:
ISection gridSection = _report.AddSection();
UltraGridDocumentExporter ugde = new UltraGridDocumentExporter();
ugde.Export(grid, gridSection);
_report.Publish("C:\\dev\\grid.pdf", FileFormat.PDF);
Thanks for your help!
Gabriel
Hi Gabriel,
The exporter has an AutoSize property which is set to autosize all the columns and rows by default. So that might be what is changing the size. But remember that the graphical units in the export are different than the ones on-screen. So if you do not autosize the rows, it's possible that you will get unexpected results and some text might get cut off.
Thanks Mike, but I found that you also have to change the default property of the grid Band "UseRowLayout" to "True" in the UltraWinGrid Designer. Then the export grid layout looks quite the same as the real display.