Home › Forums › WinForms controls › Xceed Grid for WinForms › PaintFocusRectangle even when grid loses focus
I am overriding PaintFocusRectangle to draw my own rectangle border around the selected cell.
But when the user selects a control outside the grid, the cell loses focus and my rectangle border disappears.
Can anyone think of a way to keep this rectangle? The user needs to see the selected cell even when they click elsewhere.
Imported from legacy forums. Posted by Buzz (had 758 views)
Overriding PaintFocusRectangle will only draw the rectangle when the GridControl is on focus. It is normal that the rectangle disappears when the grid control loses the focus.
To keep the rectangle, you could override the PaintBackground method on the Cell class.
Imported from legacy forums. Posted by Mohamed [Xceed] (had 890 views)