hi
I used grid view in page below is code:
<Columns>
<asp:TemplateField ItemStyle-Width="110px" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle" ItemStyle-Height="48px" ItemStyle-BackColor="red">
<ItemTemplate>
<div id="Div" runat="server" visible="false" class="ersal1">
<asp:HyperLink ID="HyperLink1" runat="server" CssClass="LBsefSe" NavigateUrl='<%# "ViewSendOrder.aspx?&PeygiriCode=" + Eval("PeygiriCode") %>'>ارسال شده</asp:HyperLink>
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
as you see here ItemStyle-BackColor is=red
below is table that bind gridview:
Id
|
Name
|
1
|
Red
|
2
|
White
|
3
|
green
|
I want if name column text=red then Itemstyle-Backcolor=red
if name=white then Itemstyle-Backcolor=white
if name=green then Itemstyle-Backcolor=green
How I can do it?
Best Regards
Neda