Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 2.85 KB

File metadata and controls

38 lines (29 loc) · 2.85 KB

WinForms Data Grid - Custom paint data cells and column headers in Print Preview

This example creates a custom Grid Control with new custom draw events (SamplePrintEvent, HeaderPrintEvent) that allow you to paint data cells and column headers in print preview:

WinForms Data Grid - Custom print data cells and column headers in Print Preview

private void MyGridView1_HeaderPrintEvent(object sender, HeaderPrintEventArgs args) {
    args.Brick.Style.BackColor = Color.PowderBlue;
}
private void simpleButton2_Click(object sender, EventArgs e) {
    myGridControl1.ShowPrintPreview();
}

Files to Review

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)