Skip to content

Customize the appearance of data cells and column headers in Print Preview using custom draw events.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/winforms-grid-custom-print-cells-headers-in-print-preview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)