Back to Devexpress

How to: Print Groups with Footers on Separate Pages

windowsforms-404241-controls-and-libraries-data-grid-examples-export-and-printing-how-to-print-groups-with-footers-on-separate-pages.md

latest792 B
Original Source

How to: Print Groups with Footers on Separate Pages

  • Jan 05, 2023

This example handles the AfterPrintRow event to print group rows with footers on separate pages.

csharp
private void gridView1_AfterPrintRow(object sender, Views.Printing.PrintRowEventArgs e) {
    if(e.HasFooter)
        e.PS.InsertPageBreak(e.Y);
}
vb
Private Sub gridView1_AfterPrintRow(ByVal sender As Object, ByVal e As Views.Printing.PrintRowEventArgs)
    If e.HasFooter Then
        e.PS.InsertPageBreak(e.Y)
    End If
End Sub