Ok now it works...
was my fault, I've not setted in the datagrid properties the
"OnItemDataBound" event...
If someone may have the same need the final code was here...
Insert the sub and don't forgot to set in the datagrid properties the
"OnItemDataBound" event
<asp

ataGrid id="DataGrid1"...
....OnItemDataBound="DataGrid1_ItemDataBoundEvent"
'---------------------------------------------------------------------------
----------
Sub DataGrid1_ItemDataBoundEvent(sender as Object, e as
DataGridItemEventArgs)
If e.Item.ItemType = ListItemType.Item _
OR e.Item.ItemType = ListItemType.AlternatingItem then
'Check to see if the genre ID is 1 (Ancillary)
If e.Item.DataItem("_ID_Tipo_Item") < 2 Then
e.Item.BackColor = System.Drawing.Color.FromName("Lavender")
End If
End If
End Sub
'---------------------------------------------------------------------------
----------
Byez,
Giorgio
"QUASAR" <> ha scritto nel messaggio
news:...
> Sorry for the long subject guys, but I don't know how better I can resume
> the matter...
>
> Anyway, I have my datagrid showing items of an order.
> I want to have different backcolor of the rows based on the value of the
> ItemType field of the current item (datagrid row)...
> Example, if the current item (datagrid row) ItemType filed value is 1 i
> wanna have this row backcolor red, if 2 then yellow, and so on...
> Was very clear how to do this in classic asp but now using the datagrid
> control nomore...
> I know I can use a datalist that is more flexible, but I wanna use
datagrid
> 
>
> Thanks! 
>
>