文檔首頁(yè)>>DevExpress WinForm中文手冊(cè)>>如何自定義打印外觀
如何自定義打印外觀
下面的示例代碼演示了如何將打印外觀和背景顏色自定義應(yīng)用于網(wǎng)格控件中的偶數(shù)行。
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
結(jié)果如下圖所示: