This is a migrated thread and some comments may be shown as answers.

GridView always show focus

2 Answers 43 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Zerka
Top achievements
Rank 1
Zerka asked on 01 Mar 2011, 11:51 AM
Hi

Visually the grid always shows as having focus even though some other control has focus. Can that be avoided?

Kindly advise any solution.

Regards!

2 Answers, 1 is accepted

Sort by
0
Accepted
Emanuel Varga
Top achievements
Rank 1
answered on 01 Mar 2011, 01:19 PM
Hello Michael,

The easiest solution would be to just clear selection on control.LostFocus, like so:

void radGridView1_LostFocus(object sender, EventArgs e)
{
    radGridView1.ClearSelection();
    radGridView1.CurrentRow = null;
}

If this does not fit your needs just let me know.

Hope this helps, if you have any other questions or comments, please let me know,

Best Regards,
Emanuel Varga
Telerik WinForms MVP
0
Zerka
Top achievements
Rank 1
answered on 01 Mar 2011, 01:58 PM
Hello

Oh That was easy :)  Actually I had been trying to change current cell instead of current row. Thank you.

Best Regards

Tags
GridView
Asked by
Zerka
Top achievements
Rank 1
Answers by
Emanuel Varga
Top achievements
Rank 1
Zerka
Top achievements
Rank 1
Share this question
or