Click here to Skip to main content
15,887,350 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hai,
I want to add a datagridviewbutton Coloumn in Datagridview.
Initally button default button text will be there.
Once i click the button in any of the row it should toggle to another text.

For Eg Default button text is Yes.
Once i click the button it should be changed as NO.

Get me sample Code...

Thanks in advance,

Regards,
K.Priya.
Posted

C#
button1.Text = button1.Text == "Yes" ? "No" : "Yes";
 
Share this answer
 
Comments
Ritwesh 6-Feb-13 12:17pm    
+5 for such a concise 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