Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
3.33/5 (3 votes)
See more:
I have a DataGridView, in which I enter the data from keyboard in TextBox columns.

There is a CheckBoxColumn in the row.

For checking or unchecking this column I could not find a keyboard shortcut, due to which every time I have to check or uncheck using the mouse.

Which is the keyboard shortcut to check or uncheck the CheckBoxColumn of DataGridView?
Posted
Updated 10-Mar-12 21:30pm
v3
Comments
ProEnggSoft 11-Mar-12 3:31am    
Edit: code tags added to the control names - PES

You can use SpaceBar to check or uncheck the CheckBoxColumn cell in DataGridView control.
 
Share this answer
 
v2
Comments
Aniket Yadav 11-Mar-12 3:18am    
My 5... This is the easiest way to do instead of checking key at backend.
ProEnggSoft 11-Mar-12 3:28am    
Thank you. It is an obscured technique not easily available in the documentation.
What you can do is catch the key down, and check for the keyboard combination, then change the state of checkbox. This will probably have to be done at the form level, and will have to check if the grid has focus, then go to the selected row.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900