I need help...

I have a datagrid that show an online status. the Status column have 2 status, OnLine n OffLine. I want to make any record that Status = Online into bold style.

is that possible ??

all I know is to make all datagrid into bold..

please help.

Private Sub DataGridView1_CellPainting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellPaintingEventArgs) Handles DataGridView1.CellPainting
        If e.RowIndex < 0 Or e.ColumnIndex < 1 Then
            Return
        End If

        If e.Value = "offline" Then
            Dim cellNew As New DataGridViewCellStyle
            cellNew.Font = New Font(Me.Font, FontStyle.Bold)
            DataGridView1.Rows(e.RowIndex).Cells(e.ColumnIndex).Style = cellNew
        End If
    End Sub

thanks... it work perfectly...

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.