Click here to Skip to main content
14,692,015 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to get gridview row values when checkbox is checked. i am using visual studio 2010.
Posted

1 solution

Seems like you've not tried anything so far and not even bother to Gooogle.. Please take a look at this :
string strEmail=stirng.Empty;
foreach (GridViewRow rw in grid1.Rows)
      {
          CheckBox chkBx = (CheckBox)rw.FindControl("Check");
          if (chkBx != null && chkBx.Checked)
          {
              strEmail = ((Label)rw.FindControl("lblEmail")).Text;
              //lblEmail is ID of the label for which you are binding EmailID's.
              // here strEmail is ready with your email id. Do the operation here.
          }
      }

(from how to get gridview row values when checkbox is checked?[^])
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900