colour row in datagrid

hi there i want to colour my rows in my datagrid differently if a certain field is true

i.e.
if this column = 1 then
dgMsgIn.Items(e.Item.ItemIndex).BackColor = Color.Red

endif

does anyone know how to write such an event
thanks