我在 VS2019 中创建了一个应用程序 aps.net c#
我有一个网格视图,它的列标题中有一个复选框。 一旦用户单击要显示的单独按钮,我想验证列标题中名为“chkALL”的复选框,以查看它是否被选中。我似乎无法获得正确的语法来执行此操作。 请问有什么建议吗?
我的 ASPX 代码在这里:
**You need to create function for use it when fire event change checked box,
So this void it write**
private void ChkAll_CheckedChanged(object sender, EventArgs e)
{
for (int i = 0; i < tgvCorrelations.Rows.Count; i++)
{
CheckBox chk =
(CheckBox)tgvCorrelations.Rows[i].Cells[0].FindControl("chkAll");
if (chk.Checked)
{
}
else
{
//...
}
}
}