Link to home
Start Free TrialLog in
Avatar of noam_dz
noam_dz

asked on

How to disable row selection in dataGridView?

I would like the user to click on the cells but without the blue selection appearing.
ASKER CERTIFIED SOLUTION
Avatar of Alexandre Simões
Alexandre Simões
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Paddy_McDonald
Paddy_McDonald

While this solution was helpful, it didn't work correctly for me.

I needed to set SelectionBackColor = BackColor and SelectionForeColor = ForeColor

Otherwise the selected text was not visible and when I tabbed to another window and back again the cell background wasn't repainted.