Dear Experts

How to make datagridview current row bold?

Please help

>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
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.