如何使用vb.net在PrintingSystem中进行页面制动(DevExpress datagrid grouping Column Header)?
答案 0 :(得分:1)
您可以使用GridView.BeforePrintRow / GridView.AfterPrintRow事件在打印每个分组行之前/之后插入分页符。
例如如下:
// C#
void gridView1_BeforePrintRow(object sender, DevExpress.XtraGrid.Views.Printing.PrintRowEventArgs e) {
if(gridView1.IsGroupRow(e.RowHandle))
e.PS.InsertPageBreak(e.Y);
}
// VB.NET
Private Sub gridView1_BeforePrintRow(ByVal sender As Object, ByVal e As DevExpress.XtraGrid.Views.Printing.PrintRowEventArgs) Handles GridView1.BeforePrintRow
If gridView1.IsGroupRow(e.RowHandle) Then
e.PS.InsertPageBreak(e.Y)
End If
End Sub