Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
550
Entering a cell that has Cell.Editor = EditorWithText causes the grid to lose focus
posted

I am changing the backcolor of both ActiveRowAppearance and SelectedRowAppearance depending on if the grid has focus or not. The issue is that placing the cursor in a cell whose editor is setup as EditorWithText, causes the control to lose focus, triggering the code that changes the color as if the grid doesn't have focus.

Thoughts?

Parents
  • 469350
    Verified Answer
    Offline posted

    When a cell goes into edit mode, some cells will display a child control inside the cell for editing. So the grid will lose focus.

    It's generally recommend in DotNet that you do not use GotFocus and LostFocus events for this reason. You should use the Enter and Leave events instead.

Reply Children
No Data