troubleshooting Question

Select a row for highlighting - Gridview control with checkbox

Avatar of bertino12
bertino12 asked on
ASP.NET
2 Comments1 Solution1495 ViewsLast Modified:
I have a checkbox column in my gridview control. I want to make it so on checkchanged it selects the row or deselects the row so the row is highlighted. Here is the code I have so far. I just need to select the row now.

    Protected Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs)
        Dim CB As CheckBox
        CB = CType(sender, CheckBox)

        If CB.Checked = True Then
            'select the row so its highlighted
        ElseIf CB.Checked = False Then
            'unselect the row so its no longer highlighted
        End If
    End Sub
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros