Selecting Multiple GridView Rows

I have a ASP.NET GridView Control that displays a user record.  I added a template colume in the GridView and within that template placed a checkbox.

I want users to be able to select multiple users from my gridview by checking the checkboxes that I put in the template field by their name.  When the user clicks and add user button I need that event handler to be albe to go to the gridview and see what items are selected based on my checkbox.

Is there any tutorial, code, or something out there to show me how to do this.  I can't find any in books or on the net now.
Who is Participating?
davehunt00Connect With a Mentor Commented:
You can do something like this:

        Dim gr As GridViewRow
        For Each gr In gvMyGrid.Rows
            Dim cbox As CheckBox = gr.FindControl("Checkbox1")   'whatever you named it
            If (cbox.Checked = True) Then
                  do something
            End If

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.