Along the lines of formatting in gridviews, has anybody found a way to
format edit or insert itemtemplate fields and send the data to the db
without having to remove the formatting?
IOW, you have an edititemtemplate <asp:TextBox id="xx" runat="server"
Text='<%# Bind("fieldName", "{0"C}") %>' ></asp:TextBox>
Which is fine, the user sees $0.00 when it comes up in edit mode, but when
updating/inserting the formatting needs to be removed for those and I
haven't found an easy way of doing it.
tom mallard
.net web applications
consumer industrial design
_____
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of
Chris Hynes
Sent: Wednesday, August 09, 2006 11:14 AM
To: [email protected]
Subject: RE: [AspNet2] Formating a gridview field
Use "{0:c3}" instead of "{0:c}" as the format specifier.
Chris
-----Original Message-----
From: [EMAIL PROTECTED] <mailto:AspNet2%40yahoogroups.com> .com
[mailto:[EMAIL PROTECTED] <mailto:AspNet2%40yahoogroups.com> .com] On
Behalf Of
rherrmann05@ <mailto:rherrmann05%40comcast.net> comcast.net
Sent: Wednesday, August 09, 2006 2:10 PM
To: [EMAIL PROTECTED] <mailto:AspNet2%40yahoogroups.com> .com
Subject: [AspNet2] Formating a gridview field
Hi all,
I have a currency value that I display in my Gridview control. Here is the
code:
<asp:TemplateField HeaderText="Labor Pallet Activities" Visible="true">
<ItemTemplate> <asp:Label ID="LaborPallet" runat="server" text='<%#
Eval("LaborPallet", "{0:c}") %>'></asp:Label> </ItemTemplate>
</asp:TemplateField> This works great but now I need to display this value
with 3 decimal positions. How can I do this?
Thanks,
Bob
[Non-text portions of this message have been removed]
Yahoo! Groups Links
[Non-text portions of this message have been removed]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNet2/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/