Here is the 'starter code' that I use when creating the ItemDataBound event. It is not guaranteed to make sense, but exists so that I have sample code that I can alter to get a faster start.
Protected Sub grdLines_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles grdLines.ItemDataBound
If e.Item.ItemType = ListItemType.Item OrElse e.Item.ItemType = ListItemType.AlternatingItem Then
'get a reference to a data item
Dim isRed As Integer = CType(DataBinder.Eval(e.Item.DataItem, "red"), String)
'get a reference to a control...
Dim lblLocncode As Label = e.Item.FindControl("lblLocncode")
End If
End Sub