I have a datagrid:
VB Code:
<asp:datagrid id="dgMaster" runat="server" EnableViewState="False" AutoGenerateColumns="False" > <AlternatingItemStyle backcolor="Firebrick" ForeColor="White"></AlternatingItemStyle> <ItemStyle backcolor="Gainsboro"></ItemStyle> <HeaderStyle font-bold="True" forecolor="White" backcolor="#6699CC"></HeaderStyle> <Columns> <asp:BoundColumn DataField="Service Date" HeaderText="Service Date" DataFormatString="{0:d}"></asp:BoundColumn> <asp:BoundColumn DataField="Description" HeaderText="Description" ></asp:BoundColumn> <asp:BoundColumn DataField="Charges" HeaderText="Charges" DataFormatString="{0:c}"> <asp:BoundColumn DataField="Payments" HeaderText="Payments" DataFormatString="{0:c}"> </asp:BoundColumn> </Columns> </asp:datagrid>
now the payments and the charges column will include 0 as a value, and having DataFormatString="{0:c}", the result is $0.00.
I would like to replace the $0.00 with say something like "-" or even an empty string. will i have to change the columns to templated column to acheive this, or is there another way around this?
Thanks.


Reply With Quote
