| |
 |
How to: Customize Print Settings When Printing GridControl
This example shows how to set the paper orientation to Landscape when printing Grid Control data. To customize print settings, the BaseView.PrintInitialize event is handled. The Landscape option is accessed via the PrintingSystem.PageSettings property.
C# |
using DevExpress.XtraPrinting;
private void gridView1_PrintInitialize(object sender, DevExpress.XtraGrid.Views.Base.PrintInitializeEventArgs e) {
PrintingSystemBase pb = e.PrintingSystem as PrintingSystemBase;
pb.PageSettings.Landscape = true;
}
gridView1.ShowPrintPreview();
|
VB |
Imports DevExpress.XtraPrinting
Private Sub GridView1_PrintInitialize(sender As System.Object, _
e As DevExpress.XtraGrid.Views.Base.PrintInitializeEventArgs) _
Handles GridView1.PrintInitialize
Dim pb As PrintingSystemBase = CType(e.PrintingSystem, PrintingSystemBase)
pb.PageSettings.Landscape = True
End Sub
GridView1.ShowPrintPreview()
|
Is this topic helpful?
Additional Feedback
Close
|