Click here to Skip to main content
15,891,567 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a datagridview and it has checkbox column. what I want is if I click on a row that row's checkbox should be checked. then I'll click another row. now earlier clicked one should be unchecked and new one should be checked. cannot select multiple checkbox at once becoz i made datagridview's multiple selection property to false. what can I do?
Please Guide me. Thanks in advance
Posted
Updated 16-Sep-13 21:02pm
v2
Comments
CodeBlack 17-Sep-13 3:06am    
Do you want checkbox to be checked on row selection only

you need to set datagridview's multiple selection property to True.
-SG
 
Share this answer
 
Make use of DataGridView.CellContentClick Event[^]. Modify the state of check boxes in this event based on your requirement.

Example code:

C# .NET - DataGridView Cellcontentclick[^]

Regards..:)
 
Share this answer
 
v2
Comments
thasneemjambi 17-Sep-13 3:11am    
can you give me a sample coding for this. please
Thanks7872 17-Sep-13 3:17am    
Refer to updated 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