Link to home
Create AccountLog in
Avatar of H-SC
H-SCFlag for United States of America

asked on

DataGridView Top Left Cell Selected By Default

Is there any way to have nothing selected on a DataGridView.  I have a form that is being used for display/"Read Only".  No matter what locked/enabled/read only/tab stop off... properties that I choose for my DataGridView it still wants to highlight the top left cell.  How can I get this to not happen.  I would prefer that the grid not have focus or any highlight/curser.

Thanks In Advance
ASKER CERTIFIED SOLUTION
Avatar of JonMny
JonMny

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of JeffvClayton
JeffvClayton

You need to use

MyDataGridView.CurrentCell = Nothing

and may be

 MyDataGridView.ClearSelection()
       
Avatar of H-SC

ASKER

JonMny,

Your solution worked!!