Answers for "landscape print gridcontrol devexpress"

C#
0

landscape print gridcontrol devexpress

private void gridView1_PrintInitialize(object sender, DevExpress.XtraGrid.Views.Base.PrintInitializeEventArgs e)
 {
   PrintingSystemBase pb = e.PrintingSystem as PrintingSystemBase;
   pb.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.Legal;
   pb.PageSettings.Landscape = true;
 }

 private void preview(GridControl grid)
 {   
   if (!grid.IsPrintingAvailable)
   {
     MessageBox.Show("The 'XtraPrinting' library is not found", "Error");
     return;
   }
  grid.ShowRibbonPrintPreview();
 }

private void btnPrint_Click(object sender, EventArgs e)
{
	preview(dtMembers);
}
Posted by: Guest on June-28-2020

C# Answers by Framework

Browse Popular Code Answers by Language