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
220
Printing problems
posted

Hi everyone!

 I have a few annoying problems with printing the UltraGrid (WinForms/7.3.1049 hotfix).

1. I set the grid's caption to visible and provide a suitable value for it, but the caption is not shown in the PrintPreview dialog. How can I fix this?

2. How can I close (by code) the PrintPreview dialog? (UltraGrid.PrintPreview(...))

3. How can I force the grid's printing to fit its width on exactly one paper sheet? (considering the current printer paper settings). I need all the grid columns to be on a single paper sheet.

Thanks!

 

Parents
  • 469350
    Verified Answer
    Offline posted

    1) I am pretty sure there is no way to print the grid caption. It's simply not part of the printable area. Perhaps you can use the PageHeader, instead? 

    2) I don't think you have access to the built-in print preview dialog. I don't see any even on the grid that exposes this dialog, anyway. Maybe I am just missing it. You could shows your own dialog, of course. 

    3) You can't limit the number of veritcal pages, but you can limit the horizontal ones like so: 

     
            private void ultraGrid1_InitializePrintPreview(object sender, CancelablePrintPreviewEventArgs e)
            {
                e.DefaultLogicalPageLayoutInfo.FitWidthToPages = 1;
            }

Reply Children
No Data