usegeShuddy
New Member
I am databinding a gridview and one of the columns is defined as shown below. What I would like to do is to colour the text depending on whether the text says "Yes" or "No". If the text is "Yes" I'd like to set it to red else set it to green. Can this be done and if so should it be done via css or can I add some code to the line?\[code\]<asp:TemplateField HeaderText="Validated" ItemStyle-HorizontalAlign="Center" SortExpression="Product"> <ItemTemplate> <asp:Label ID="lblValidated" runat="server" Text='<%# Bind("Validation") %>' /> </ItemTemplate></asp:TemplateField>\[/code\]