2
Answers

gridview Checkbox value

Hi,
 
I have 2 rows in gridview with checkbox, checkbox checked data I want to insert in database.
 
I have created this code but here row is showing 0 so its not working
 
submit button click
 
foreach (GridViewRow row in grdv_rights.Rows)
{
CheckBox chk = (CheckBox)row.FindControl("chkSelect");
if (chk.Checked)
{
lbl_user_rights.Text = "test msg";
}
}
 
please tell me the issue.
 

Answers (2)