|
protected void CheckAll (object sender, EventArgs e)
{
CheckBox cbx = (CheckBox) sender;
string checkstr;
foreach (GridViewRow gvr in gvComUnion.Rows)
{
CheckBox ch = (CheckBox) gvr.FindControl ("ItemCheckBox");
//ch.Checked = cbx.Checked;
if (ch! = null)
{
checkstr + = string.Format ("; document.all ['{0}']. checked = true", ch.ClientID);
}
}
Page.RegisterStartupScript ("key1", string.Format ("<script> {0} </ script>", checkstr));
}
Is that right? Can not be done |
|