protected void chkDefault_CheckedChanged(object sender, EventArgs e){string str;CheckBox chk = (CheckBox)sender;//chk.AutoPostBack = true ;foreach (GridViewRow gvrow in GridView1.Rows){bool result = ((CheckBox)gvrow.FindControl("chkDefault")).Checked;TextBox txt = (TextBox)gvrow.Cells[4].FindControl("txtDefault");if (result == true){txt.Visible = true;txt.Focus();str = txt.Text;}else if (result == false){txt.Visible = false;str = null;}}}
foreach (GridDataItem dataItem in GridView1.MasterTableView.Items){ (dataItem.FindControl("chkDefault") as CheckBox).Checked = false;}