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
1815
Printing a grid with alot of columns in landscape mode and with FitWidthToPages = 1
posted

I am using the latest patch release of 16.2. I have an ultrawingrid to print that has a lot of columns and I want to print it in landscape mode. 

I am using an UltraGridPrintDocument and set FitWidthToPages = 1 and while all of the columns fit the text in them is so compressed it is impossible to read them.

I set FitWidthToPages  to 2 and none of the columns creep over the the next page and the text is all readable which is good but I get a blank second page which is annoying.

Any suggestions please? Screen prints attached. Thank you in advance for your help

FitWidthToPages.zip
Parents
No Data
Reply
  • 530
    Offline posted

    Hello skalyniuk,

    I would like to ask you if you can fit all the columns into one page by using PerformAutoResize in InitializePrint event, which will be called when PrintPreview dialog appears. You can test the code below while you set FitWidthToPages to 1.

    Example:

    private void ultraGrid1_InitializePrint(object sender, Infragistics.Win.UltraWinGrid.CancelablePrintEventArgs e)
    {
        foreach (var col in e.PrintLayout.Bands[0].Columns)
        {
            col.PerformAutoResize(PerformAutoSizeType.VisibleRows, AutoResizeColumnWidthOptions.IncludeHeader);
        }
    }

    Please let me know if this works for you.

    Best regards,
    Yuki
    Developer Support Engineer
    Infragistics Inc.

Children
No Data