Xceed Grid for WinForms v4.3 Documentation
Welcome to Xceed Grid for WinForms v4.3 / Task-Based Help / Printing / How to print the grid in landscape orientation

In This Topic
    How to print the grid in landscape orientation
    In This Topic

    By default, the grid will always be printed in portrait orientation. In order to print the grid in landscape orientation, you need to create a new instance of the GridPrintDocument class and set the DefaultPageSettings.Landscape property to true.

    Demonstration

    The following examples demonstrates how to print the grid in landscape orientation:

    VB.NET Copy Code

    Dim print As New GridPrintDocument(GridControl1)

    print.DefaultPageSettings.Landscape = True
    print.Print()

    C# Copy Code

    GridPrintDocument print = new GridPrintDocument( gridControl1 );

    print.DefaultPageSettings.Landscape = true;
    print.Print();

    Keep in mind that if you call the grid's Print or PrintPreview methods, the grid will always be printed with the default print document (and therefore in portrait orientation).