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.
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;
}
//Show a print preview to test the Landscape paper orientation
gridView1.ShowPrintPreview();