try this
<head>
<script src="jquery.js"></script>
<script>
function GridSelectAllColumn(obj, val) {
var $tr = $(obj).parent().parent();
if (val == 'chkGood') {
$("input[id*='chkG']", $tr)[0].checked = true;
$("input[id*='chkP']", $tr)[0].checked = false;
} else {
$("input[id*='chkG']", $tr)[0].checked = false;
$("input[id*='chkP']", $tr)[0].checked = true;
}
}
</script>
</head>
protected void ButtonSubmit_Click(object sender, EventArgs e)
{
foreach (GridViewRow row in gvEdit.Rows)
{
CheckBox chkG = (CheckBox)row.FindControl("chkG");
CheckBox chkP = (CheckBox)row.FindControl("chkP");
string question = row.Cells[0].Text;
string selectedValue = chkG.Checked ? "CheckG" : chkP.Checked ? "CheckP" : "Not Selected";
}
}
Bind the data Inside !IsPostBack block
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DataTable question_x = new DataTable("Question");
question_x.Columns.Add(new DataColumn("ID", System.Type.GetType("System.UInt64")));
question_x.Columns.Add(new DataColumn("Name"));
question_x.Rows.Add(1, "1) Training deliver can be understood?");
question_x.Rows.Add(1, "2) The way instructor deliver the training is satisfaction?");
question_x.Rows.Add(1, "3) The notes are easy to understand?");
question_x.Rows.Add(1, "4) The training room is appropriate?");
question_x.Rows.Add(1, "5) The training time is satisfactory?");
gvEdit.DataSource = question_x;
gvEdit.DataBind();
}
}