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
1834
How do I maximize UltraGrid print preview dialog by default?
posted

I couldn't find an answer to this, when I do the print preview, I want it to open maximized.

I am calling grid.PrintPreview(UltraGridLayout layout, PrintDocument printDocument, RowPropertyCategories retainRowPropertyCategories) from a button click event, then setting layout data in grid_InitializePrintPreview.  In this latter function, I see how to change the dialog height and such in e.PrintPreviewSettings, but not its window state.  Is that possible?

Thanks,

J

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi J,

    Actually, there is a way to do this using the UltraPrintPreviewDialog instead of the built-in print preview in the grid. You need an UltraGridPrintDocument, too.


                this.ultraGridPrintDocument1.Grid = this.ultraGrid1;
                this.ultraPrintPreviewDialog1.Document = this.ultraGridPrintDocument1;           
                this.ultraPrintPreviewDialog1.Show(this);
                this.OwnedForms[0].WindowState = FormWindowState.Maximized;

Children
No Data