【问题标题】:How to page brake (DevExpress datagrid grouping Column Header wise) in PrintingSystem using vb.net?如何使用 vb.net 在 PrintingSystem 中分页制动(DevExpress 数据网格分组列标题明智)?
【发布时间】:2013-12-24 12:35:16
【问题描述】:

如何使用 vb.net 在 PrintingSystem 中分页制动(DevExpress 数据网格分组列标题明智)?

【问题讨论】:

    标签: datagrid devexpress grouping


    【解决方案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
    

    【讨论】:

    • 感谢您的回复。但我使用 devExpress 网格控件。如果你可以给我你的电子邮件地址,我可以给你发送示例项目。谢谢
    • 请再次查看我的回答,因为它是关于 DevExpress GridControl 及其 GridView
    • 谢谢朋友。我修改你的代码。 IsGroupRow(e.RowHandle + 1) 现在它的工作。你知道桌子刹车和 1 行空间,下一组开始。 (同样的问题,但没有分页符)。谢谢
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-10-17
    • 2011-04-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多