Skip to content

DevExpress-Examples/winforms-grid-draw-thick-border-abound-focused-cell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)