lo devi adattare, ma il principio dovrebbe essere lo stesso
codice:
Private e_precedente As System.Web.UI.WebControls.GridViewRowEventArgs = Nothing
Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound
Dim dbr As System.Data.Common.DbDataRecord = DirectCast(e.Row.DataItem, System.Data.Common.DbDataRecord)
If e.Row.RowType = DataControlRowType.DataRow Then
Dim codice_istat_regione As String = dbr("codice_istat_regione").ToString()
If codice_istat_regione = "06" Then
'e.Row.Visible = False
e.Row.Style.Add("background-color", "red")
e.Row.Style.Add("color", "yellow")
e.Row.Style.Add("font-weight", "700")
If e_precedente IsNot Nothing Then
e_precedente.Row.Style.Add("background-color", "blue")
e_precedente.Row.Style.Add("color", "yellow")
e_precedente.Row.Style.Add("font-weight", "700")
End If
End If
e_precedente = e
End If
End Sub