Quantcast
Channel: Gridview Search Tool
Viewing all articles
Browse latest Browse all 7

Re: Gridview Search Tool

$
0
0

You did not mention VB or C but you can convert my VB if necessary.  This is a simple search I'm using to find checkbox status and you can modify as necessary:

        For I = 0 To GridView1.Rows.Count - 1   'Send To:
            Dim Tbox As CheckBox = DirectCast(GridView1.Rows(I).FindControl("CheckBox1"), CheckBox)
            Dim Cbox As CheckBox = DirectCast(GridView1.Rows(I).FindControl("CheckBox2"), CheckBox)

            If Tbox.Checked = True Then
                Recpt = GridView1.Rows(I).Cells(2).Text.ToString
            End If

            If Cbox.Checked = True Then
                Recpt = GridView1.Rows(I).Cells(2).Text.ToString
            End If
        Next

Remember, your count for both rows and columns begins at 0.

Hope this helps!


Viewing all articles
Browse latest Browse all 7

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>