I figured out how to do this with a BoundColumn - but not a TemplateColumn. I have a column in a datagrid whose values I want to be formatted as DataFormatString="{0:N0}" - like I would with a BoundColumn. I don't see such an option for a TemplateColumn. Can this be done? My TemplateColumn is defined as follows:
<asp:TemplateColumn FooterStyle-Font-Bold="True" FooterStyle-HorizontalAlign="Right" HeaderStyle-CssClass="mdcaptext" HeaderStyle-Font-Bold=True ItemStyle-BackColor=#d5e0f1 HeaderText="CYTD Actual" ItemStyle-HorizontalAlign="Right" HeaderStyle-Font-Size="8" HeaderStyle-HorizontalAlign=Center>
<ItemTemplate>
<asp:Label id="lblCYTDActual" runat="server" Font-Bold=<%# findBold(DataBinder.Eval(Container.DataItem, "total_info".ToString())%> Text='<%# DataBinder.Eval(Container.DataItem, "cytd_actual" %>'>
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
(Sorry about the wrapping text).
Thanks
Tim Ryan
Tim Ryan
PROGRESS Developer
<asp:TemplateColumn FooterStyle-Font-Bold="True" FooterStyle-HorizontalAlign="Right" HeaderStyle-CssClass="mdcaptext" HeaderStyle-Font-Bold=True ItemStyle-BackColor=#d5e0f1 HeaderText="CYTD Actual" ItemStyle-HorizontalAlign="Right" HeaderStyle-Font-Size="8" HeaderStyle-HorizontalAlign=Center>
<ItemTemplate>
<asp:Label id="lblCYTDActual" runat="server" Font-Bold=<%# findBold(DataBinder.Eval(Container.DataItem, "total_info".ToString())%> Text='<%# DataBinder.Eval(Container.DataItem, "cytd_actual" %>'>
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
(Sorry about the wrapping text).
Thanks
Tim Ryan
Tim Ryan
PROGRESS Developer