I need a row to change colour if the value in a certain column in the database is true.
EG If the column "completed" in the database has a value of 'true' for a certain row then I'd like that row in the datagrid to be blue.
I have this:
If e.Item.ItemType = ListItemType.Item Or _
e.Item.ItemType = ListItemType.AlternatingItem Then
If e.Item.DataItem("Actioned") = "0" Then _
e.Item.BackColor = System.Drawing.Color.FromName("#ff6")
Which works but I need to add to it so that the value of "completed" is looked up in the database rather than the datagrid like above.