Changing color of row on DataGrid when clicked/selected

How can I change the color of the row when it is clicked in or selected? thanks
LVL 16
MikeMCSDAsked:
Who is Participating?
 
af4643Commented:
if you're editing your row, you'll have and sub function that selects the index to edit like this:

    Sub dgrdTime_EditCommand(ByVal s As Object, ByVal e As DataGridCommandEventArgs)
        dgrdTime.EditItemIndex = e.Item.ItemIndex
        BindDataGrid()

        dgrdTime.Items(dgrdTime.EditItemIndex).BackColor = Color.LightBlue
    End Sub

Just set the backcolor there.
0
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.