By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,058 Members | 1,336 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,058 IT Pros & Developers. It's quick & easy.

DataGridView Unhighlight active cell

P: 7
I have a very large DataGridView. When the user is done entering data, they click a button to perform calculations. The last cell the user entered data on remains highlighted (blue in my case). This ruins the other highlighting scheme I added to the calculations. How can I remove this highlight from the grid? Setting focus elsewhere doesn't help.

Thanks
Dec 28 '07 #1
Share this Question
Share on Google+
1 Reply


P: 1
I have a very large DataGridView. When the user is done entering data, they click a button to perform calculations. The last cell the user entered data on remains highlighted (blue in my case). This ruins the other highlighting scheme I added to the calculations. How can I remove this highlight from the grid? Setting focus elsewhere doesn't help.

Thanks
6 months too late! but, maybe it will help someone in the future.

Assuming 1 row only.
For Each dgvCell In Me.Datagridview.Rows(0).Cells
If dgvCell.Selected = True Then
dgvCell.Selected = False
End If
Next
Apr 16 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.