文档彩票走势图>>DevExpress WinForm中文手册>>如何自定义打印外观
如何自定义打印外观
下面的示例代码演示了如何将打印外观和背景颜色自定义应用于网格控件中的偶数行。
C#:
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.NET:
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
结果如下图所示: