I want to set background color for particular cell of gridview when that cell have any value, if it is empty then need to set another color.
How can i do that?
<asp:TemplateField HeaderText="Rejected by">
<ItemTemplate>
<asp:Label ID="Rejectedby" runat="server" Text='<%#Eval("RejectedBy") %>'
BackColor ='<%# (System.Convert.ToString(Eval("RejectedBy"))) != "" ? "Red" : "Gray" %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
Go to the complete details ...