protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string strScript = "uncheckOthers(" + ((CheckBox)e.Row.Cells[0].FindControl("CheckBox1")).ClientID + ");";
((CheckBox)e.Row.Cells[0].FindControl("CheckBox1")).Attributes.Add("onclick", strScript);
}
}
protected void GridView1_PageIndexChanged(object sender, EventArgs e)
{
CheckBox ch = ((CheckBox)GridView1.SelectedRow.Cells[0].FindControl("CheckBox1"));
ch.Checked = true;
}
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string strScript = "uncheckOthers(" + ((CheckBox)e.Row.Cells[0].FindControl("CheckBox1")).ClientID + ");";
((CheckBox)e.Row.Cells[0].FindControl("CheckBox1")).Attributes.Add("onclick", strScript);
}
}
protected void GridView1_PageIndexChanged(object sender, EventArgs e)
{
CheckBox ch = ((CheckBox)GridView1.SelectedRow.Cells[0].FindControl("CheckBox1"));
ch.Checked = true;
}
No comments:
Post a Comment