使用C#在datagridview中复选框更改事件 [英] check box change event in datagridview using C#
本文介绍了使用C#在datagridview中复选框更改事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
注意它是windows应用程序。
在设计中我有一个datgridview,在datagridview中我有一个复选框。
i想要在该复选框的复选框更改事件代码中编写代码。
我怎样才能使用c sharp。
请帮帮我。
问候,
Narasiman P 。
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.
推荐答案
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;
}
这篇关于使用C#在datagridview中复选框更改事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文