checkbox in gridview not checked is flase when submit click But when i modify and update button click checked is TRUE
public void addchapselect()
{
TextBox1.Text = "";
for (int i = 0; i < gvChapter.Rows.Count; i++)
{
CheckBox chkbox = (CheckBox)gvChapter.Rows[i].Cells[0].FindControl("chkSelect");
if (chkbox != null)
{
if (chkbox.Checked)
{
TextBox1.Text += Convert.ToString(gvChapter.Rows[i].Cells[0].Text) + ",";
// ItemValueId = ItemValueId + ",";
string Name = Convert.ToString(gvChapter.Rows[i].Cells[1].Text);
}
}
chkbox.Checked = false;
}
if (TextBox1.Text != "")
TextBox1.Text = TextBox1.Text.Substring(0, TextBox1.Text.Length - 1);
}