im using a gridview to display data taken from a dataset which looks like
NAME | GP | ORD_GP | EXP | TOTAL GP | TARGET
a 206 48 -239 15 1600
b 0 27 0 27 1520
TOTAL 206 75 -239 42 3120
im using TemplateField like so but this can just format values.
<asp:TemplateField HeaderText="%" ItemStyle-BackColor="Yellow" >
<ItemTemplate>
<span class='<%# double.Parse(Eval("PERC_OF_TARGET").ToString()) >= 100 ? "PERC_MoreThan" : "PERC_LessThan" %>'>
<%# Eval("PERC_OF_TARGET")%> %
</span>
</ItemTemplate>
</asp:TemplateField>
however what I want to do is format the last row (TOTAL) so that the background colour is green.
also is there a way that I can evaluate each item and if it equals to 0 Do not display anything and just leave it blank ?