Hi All,
I am loading a datagrid with data that selects everything with an 'Open' status but I would like to color code the datagrid based on my 'TrioleOpenDate' column taken from the Access table:
If the opendate is <= 3 days old nothing changes
If the opendate is >= 4 but <= 6 days then the rows turn yellow
If the opendate is => 7 days the rows are red.
So far I have all rows turning red
For i As Integer = 0 To Me.DGView1.Rows.Count - 1
If Me.DGView1.Rows(i).Cells("TrioleOpenDate").Value < CDate(Now) Then
Me.DGView1.Rows(i).DefaultCellStyle.BackColor = Color.Red
End If
Next
Again many thanks for all yur help.
I am loading a datagrid with data that selects everything with an 'Open' status but I would like to color code the datagrid based on my 'TrioleOpenDate' column taken from the Access table:
If the opendate is <= 3 days old nothing changes
If the opendate is >= 4 but <= 6 days then the rows turn yellow
If the opendate is => 7 days the rows are red.
So far I have all rows turning red
For i As Integer = 0 To Me.DGView1.Rows.Count - 1
If Me.DGView1.Rows(i).Cells("TrioleOpenDate").Value < CDate(Now) Then
Me.DGView1.Rows(i).DefaultCellStyle.BackColor = Color.Red
End If
Next
Again many thanks for all yur help.