<script type="text/javascript">
function document.getElementById("<%= GridView1.ClientID %>");
variable to contain the cell of the grid
document.getElementById(id).checked;
}
}
}
}
}
</script> Server side binding for checkbox is as follow:
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
((CheckBox)e.Row.FindControl("cbSelectAll")). Attributes.Add("onclick", "javascript:SelectAll('" +
((CheckBox)e.Row.FindControl("cbSelectAll")).ClientID + "')");
}
} |
Working as Technical Consultant on CRM. I am Microsoft Certified Professional in Sharepoint development and.Net Development. I am also a Salesforce Certified Developer
Tuesday, 12 July 2011
Check/uncheck GridView Header checkbox using Javascript Code
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment