Home Forums WinForms controls Xceed Grid for WinForms How to print the grid in landscape orientation

Viewing 1 post (of 1 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #17820 |

    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.

    VB.NET

    Dim print As New GridPrintDocument(GridControl1)

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

    C#

    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).

    Imported from legacy forums. Posted by Xceed admin (had 957 views)

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.