First of
all you need identify the Column data type. If the column data type is integer
then you need to write below code
<asp:TemplateField HeaderText="Bill Value" HeaderStyle-CssClass="CenterAlign" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID='lblBillValue' runat="Server" Text='<%# (Convert.ToInt32(Eval("Value")) > 0?Eval("Value", "{0:0.00}"):"")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
No comments:
Post a Comment