Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 2.71 KB

File metadata and controls

43 lines (32 loc) · 2.71 KB

WinForms Data Grid - Custom draw grid lines

This example creates a custom grid control with the CustomDrawGridLine event that allows you to paint grid lines:

private void myGridView1_CustomDrawGridLine(object sender, CustomDrawLineEventArgs e) {
    if(e.CellInfo != null)
        e.Appearance.BackColor = e.CellInfo.RowHandle % 2 == 0 ? Color.BlueViolet : Color.DarkOrange;
    else {
        e.Cache.FillRectangle(Brushes.CadetBlue, e.Bounds);
        e.Handled = true;
    }
}

Files to Review

Documentation

Does this example address your development requirements/objectives?

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