Ive got a Datagrid populated from a datatable. I want to change the display font color for an entire row where the 5th column's (Column Name in SQL = DDLS_Num) value is greater than 3.
Using conn As SqlConnection = New SqlConnection(ConnectionString)
conn.Open()
Using comm As SqlCommand = New SqlCommand(sqlquery, conn)
Dim rs As SqlDataReader = comm.ExecuteReader
Dim dt As DataTable = New DataTable
dt.Load(rs)
datgDXLog.DataSource = dt
' If the 5th column's [or column name] value is >=3 Then
' DataGridView1.Rows[5] [OR COLUMN NAME?] .DefaultCellStyle.ForeColor = Color.Red
' EndIF
End Using 'comm
End Using 'conn