title: change gridview row color based on templatefields without controls
body: <p>My gridview does not use controls, because it is populated using expressions </p>
  
  <pre><code>&lt;asp:TemplateField HeaderText="As Of Sales"&gt;
  &lt;ItemTemplate&gt;
   &lt;%#Getsales(Decimal.Parse(Eval("asofsales").ToString())).ToString("C0")%&gt;
  &lt;/ItemTemplate&gt;
  &lt;FooterTemplate&gt;
  &lt;%#Getsales1().ToString("C0")%&gt;
  &lt;/FooterTemplate&gt;
      &lt;FooterStyle Font-Bold="True" /&gt;
  &lt;/asp:TemplateField&gt;
  </code></pre>
  
  <p>I want to compare column index 1 and column index 8, and if 8 is bigger then 1 it should be a different font color.</p>
  
  <pre><code>Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs)
  
      If e.Row.RowType = DataControlRowType.DataRow Then
          Dim x As String
          x = e.Row.Cells(1).Text
  
          Dim y As String
          y = e.Row.Cells(8).Text
  
          If Convert.ToInt32(x) &lt;= Convert.ToInt32(y) Then
              e.Row.ForeColor = System.Drawing.Color.Blue
          End If
  
      End If
  End Sub
  </code></pre>