【发布时间】:2013-12-24 12:35:16
【问题描述】:
如何使用 vb.net 在 PrintingSystem 中分页制动(DevExpress 数据网格分组列标题明智)?
【问题讨论】:
标签: datagrid devexpress grouping
如何使用 vb.net 在 PrintingSystem 中分页制动(DevExpress 数据网格分组列标题明智)?
【问题讨论】:
标签: datagrid devexpress grouping
您可以使用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
【讨论】: