2
Contributors
1
Reply
15
Views
7 Years
Discussion Span
Last Post by __avd
0

>How to make datagridview current row bold?

Use RowEnter and RowLeave event handler.

.....
        .....
       AddHandler DataGridView1.RowEnter, AddressOf test1
        AddHandler DataGridView1.RowLeave, AddressOf test2
    End Sub

    Sub test1(ByVal s As Object, ByVal e As DataGridViewCellEventArgs)
        DataGridView1.Rows(e.RowIndex).DefaultCellStyle.Font = New Font("Arial", 10, FontStyle.Bold)
    End Sub
    Sub test2(ByVal s As Object, ByVal e As DataGridViewCellEventArgs)
        DataGridView1.Rows(e.RowIndex).DefaultCellStyle.Font = New Font("Arial", 10, FontStyle.Regular)
    End Sub
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.