Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

GridView DataFormatString, background color according to numeric values

$
0
0

Hi, I have a GridView column that I have to format the background color of each cell according to the numeric value. I thought about using the DataFormatingString. If the value is higher than 400 the color is red, between 200 and 400 the color is orange, lower than 200 the color is yellow, under 0 the color is green. Is it possible?

This is the GridView code:

<asp:TemplateField HeaderText="Retard" SortExpression="Retard"><ItemTemplate><asp:Label ID="Label1" runat="server" Text='<%# Bind("Retard") %>'></asp:Label></ItemTemplate></asp:TemplateField>




Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>