2

I am using a gridview in asp.net with the left column being checkboxes. How can I tell which rows have a checkbox "checked" upon button submit?

2 Answers 2

1
CheckBox chkBx = new CheckBox();

for (int i = 0; i < grdView.Rows.Count; ++i)
{
chkBx = (CheckBox)grdView.Rows[i].FindControl("yourCheckBoxIDInHTMLView");

 if (chkBx.Checked == true)
 {
  // Do some work here
 }
}
Sign up to request clarification or add additional context in comments.

Comments

0

Adding a GridView Column of Checkboxes

Adding checkbox column to GridView dynamically (on VB.NET)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.