Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 2.5 KB

File metadata and controls

42 lines (30 loc) · 2.5 KB

WinForms Data Grid - Draw a thick border around the focused cell (CustomDrawCell event)

This example handles the CustomDrawCell event to paint a thick border around the focused cell.

private void gridView1_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e) {
    GridView view = sender as GridView;
    if (e.Column == view.FocusedColumn && e.RowHandle == view.FocusedRowHandle) {
        e.DefaultDraw();
        CellDrawHelper.DrawCellBorder(e);
        e.Handled = true;
    }
}

Files to Review

Documentation

See Also

Does this example address your development requirements/objectives?

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