rachayita jaiswal

rachayita jaiswal

  • NA
  • 217
  • 103.7k

gridview Checkbox value

Feb 18 2014 1:42 AM
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)