function HeaderClick(CheckBox) { //Get target base & child control. var TargetBaseControl = document.getElementById('<%= this.gvAllClients.ClientID %>'); var TargetChildControl = "chkEmail_Single"; //Get all the control of the type INPUT in the base control. var Inputs = TargetBaseControl.getElementsByTagName("input"); //Checked/Unchecked all the checkBoxes in side the GridView. for(var n = 0; n < Inputs.length; ++n) if(Inputs[n].type == 'checkbox' && Inputs[n].id.indexOf(TargetChildControl,0) >= 0) Inputs[n].checked = CheckBox.checked; //Reset Counter Counter = CheckBox.checked ? TotalChkBx : 0; }
protected void btnEmail_Click(object sender, EventArgs e) { for (int ict = 0; ict < gvAllClients.Rows.Count; ict++) { CheckBox check = ((CheckBox)(gvAllClients.Rows[ict].FindControl("chkEmail_Single"))); if (check.Checked = true) { string strDatatype = gvAllClients.Rows[ict].Cells[5].Text.ToString(); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)