Back to Devexpress

How to: Customize Print Appearances

windowsforms-1873-build-an-application-printing-and-exporting-how-to-customize-print-appearances.md

latest1000 B
Original Source

How to: Customize Print Appearances

  • Oct 29, 2020

The following sample code demonstrates how to apply print appearances and background color customization to even rows in the Grid Control.

csharp
gridView1.OptionsPrint.UsePrintStyles = true;
// Enable the AppearancePrint.EvenRow property's settings.
gridView1.OptionsPrint.EnableAppearanceEvenRow = true;
// Set the background color of the even rows.
gridView1.AppearancePrint.EvenRow.BackColor = Color.LightYellow;
vb
GridView1.OptionsPrint.UsePrintStyles = True
' Enable the AppearancePrint.EvenRow property's settings.
GridView1.OptionsPrint.EnableAppearanceEvenRow = True
' Set the background color of the even rows.
GridView1.AppearancePrint.EvenRow.BackColor = Color.LightYellow

The result is shown in the image below.