//In Onchange Event
Add AutoPoseBack=true
And-----------
protected void CheckBox1_CheckedChanged(object sender, EventArgs e){
foreach (GridViewRow row in GridView1.Rows)
{
CheckBox ch = (CheckBox) row.FindControl("CheckBox1");
ch.Checked = false;
}
CheckBox checkbox = (CheckBox)sender;
checkbox.Checked = true;
GridViewRow row = (GridViewRow)checkbox.NamingContainer;
DisplayMessage(row.Cells[1].Text);
}
No comments:
Post a Comment