0

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.

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by murid
0
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
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.