Is there a way to make the binding work with string format?
<asp:TemplateField HeaderText="Price" >
<EditItemTemplate>
<asp:TextBox ID="txtPrice" runat="server" Text='<%# String.Foramt("{0:#,###}",Bind("Price")) %>' />
</EditItemTemplate>
You could use the following overload which allows you to specify the format:
<%# Bind("Price", "{0:#,###}") %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With