Click here to Skip to main content
15,885,435 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
note it is windows application.

in design i have one datgridview and in that datagridview i have one checkbox.

i want to write the code in checkbox change event code for that checkbox.

how can i do using c sharp.

Please help me.


Regards,
Narasiman P.
Posted

1 solution

C#
public bool checkedthecheckbox { get; set; }

CheckBox testchbox = new CheckBox();

private void Form1_Load(object sender, EventArgs e)
{
    testchbox.CheckedChanged += new EventHandler(testchbox_CheckedChanged);
}

void testchbox_CheckedChanged(object sender, EventArgs e)
{
    if (testchbox.Checked)
        checkedthecheckbox = true;
    else
        checkedthecheckbox = false;
}
 
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