Home Forums WinForms controls Xceed Grid for WinForms How to print a range of pages

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

    If you use the grid’s Print method, the entire grid will be printed unless you create a GridPrintDocument object, set its properties and call its Print method instead. By setting the GridPrintDocument’s PrinterSettings.FromPage and .ToPage to define the range of pages to print. If you want to decide on a page-by-page basis, you must handle the QueryPrintPage event where you can set the IsPageSelected boolean to decide if that page should be printed.


    Dim printDocument As New GridPrintDocument(GridControl1)

    printDocument.PrinterSettings.PrintRange = Drawing.Printing.PrintRange.SomePages
    printDocument.PrinterSettings.FromPage = 2
    printDocument.PrinterSettings.ToPage = 5



    GridPrintDocument printDocument = New GridPrintDocument(GridControl1);

    printDocument.PrinterSettings.PrintRange = Drawing.Printing.PrintRange.SomePages;
    printDocument.PrinterSettings.FromPage = 2;
    printDocument.PrinterSettings.ToPage = 5;


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

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