Gridview snippets…

 

 

 

    Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound

 

        Dim Price As Decimal

        Price = CType(DataBinder.Eval(e.Row.DataItem, "UnitPrice"), Decimal)

        If Price > 50 Then

            e.Row.BackColor = System.Drawing.Color.Maroon

            e.Row.ForeColor = System.Drawing.Color.White

            e.Row.Font.Bold = True

        End If

 

    End Sub

 

 

All about DataKeyNames