Hello,
the UltraGridPrintDocument should print WYSIWYG by default, that's what I thought. But printing a Grid, where all the columns are displayed correctly on screen, takes away 1 character from the values in almost every column when printed (or in the PrintPreview). Now, the values are shortened and an ellipsis is shown.
That's all I coded:ultraGridPrintDocument.Grid = this.gridReport;ultraGridPrintDocument .Print();
Is there an easy way to get WYSIWYG, instead of working around in InitializePrint or InitializePrintPreview with column.PerformAutoResize?
Thanks for your help!
The grid DOES print WYSIWYG. The problem is that the screen uses different drawing units than the printer. So the width of the column on-screen may fit the text perfectly, but when the same width is used on a printer, the text may not fit the same.
Calling PerformAutoResize on each column on the print layout accounts for this, since the print layout knows to use printer metrics and not screen metrics.
It is not working.
My Grid is in split container. i have only 3 columns.
Grid.AutofityStyle = ExtandedLastColumn.
I did steps accordint as you said. But didnt work. Following is the code
{
}
e.DefaultLogicalPageLayoutInfo.FitWidthToPages = 1;