title: Give Gridview cell font colour according to condition
body: <p>How can I give colour to gridview's cell text according to condition.
  I have a below gridview and I am taking data in gridview by code behind.</p>
  
  <pre><code> &lt;asp:GridView ID="GridView3" runat="server" AllowPaging="true" PageSize="5"
     AutoGenerateColumns="false"  Width="100%" OnPageIndexChanging="GridView3_PageIndexChanging"
     CssClass="Grid"&gt;
                     &lt;RowStyle CssClass="GridRow"/&gt;
                       &lt;Columns&gt;
                           &lt;asp:BoundField HeaderText="No" DataField="id" Visible="false"/&gt;
                           &lt;asp:BoundField HeaderText="Scenario" DataField="Scenario"/&gt;
                           &lt;asp:BoundField HeaderText="Type" DataField="Type"/&gt;
                           &lt;asp:BoundField HeaderText="Station Name" DataField="StationName"/&gt;
                           &lt;asp:BoundField HeaderText="Parameter" DataField="PARAM"/&gt;
                           &lt;asp:BoundField HeaderText="Value" DataField="Value"
                           SortExpression="Value" DataFormatString="{0:F2}"/&gt;
                      &lt;/Columns&gt;
                       &lt;PagerStyle BackColor="White" Height="40px" Font-Bold="true" Font-
                        Size="Medium" ForeColor="Green" HorizontalAlign="Center"/&gt;
                        &lt;PagerSettings FirstPageText="First" LastPageText="Last" 
                        Mode="NumericFirstLast" PageButtonCount="3" /&gt;
                        &lt;HeaderStyle BackColor="#ABDB78" ForeColor="Black" Height="35px" Font-
                        Size="13px" Font-Names="verdana"/&gt;
                  &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>I am binding data with this grid by code behind.</p>
  
  <pre><code>   protected void ReservGridBind()
      {
          string name = Request.QueryString[1].ToString();
  
          string query = "SELECT SD.id,SD.Scenario,SD.Value,PR.Type,PR.StationName,PR.PARAM 
          from sgwebdb.param_reference as PR Inner join sgwebdb.scenario_data as SD 
          ON PR.Param_Id=SD.Param_Id INNER JOIN sgwebdb.qualicision_detail as Q 
          ON SD.SCENARIO=Q.Alternative where PR.Type='Reservoirs' and Q.Alternative='" + name +"'";
  
          this.GridView1.DataSource = PSI.DataAccess.Database.DatabaseManager
                                      .GetConnection().GetData(query);
          GridView1.DataBind();
  
      condition :
      if  number &lt; 0.0 then blue colour ,
       number &gt; 0.0 &amp;&amp; text &lt; 4.0 then green colour,
        number &gt; 4.0 then red colour.
  
      Please help me for this gridview's cell text colour.
  </code></pre>