Click here to Skip to main content
15,889,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I'm using a datagridview in my ASP.NET project.It has 5 colums which one of them has line number from 1 to 10 and others have checkboxes.If A user selects a checkbox from any column and later changes his idea and select new one without unchecking previous selection before pressing save button ; first selection must be empty or a message warns user which says “ there is already selected one ”.

How will I do this ?

Thanks in advance
Posted
Updated 20-Aug-10 1:52am
v4
Comments
Sandeep Mewara 26-Jul-10 11:04am    
If you want to have only one selection then use radio buttons instead of checkboxes

You can use grid cell validating event to check that 'already a checkbox is selected'.
 
Share this answer
 
Using radio button is better if you just want user to select single row.
 
Share this answer
 
this article will definately help you

HighonCoding - Article



THanks
Hiren Soanki
 
Share this answer
 
v2

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