/winforms-grid-custom-draw-grid-lines

Create a custom Grid Control with the CustomDrawGridLine event.

Primary LanguageVisual Basic .NETOtherNOASSERTION

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)