By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,451 Members | 981 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,451 IT Pros & Developers. It's quick & easy.

dataGrid

P: n/a
jay
I have a databound grid on my form. I edited the collection and set
the defaultCellStyle.Format = c2 on a particular column, but when I
enter 100 thats the way it is displayed in the grid. If the format is
c2 it is supposed to display $100.00. What am I missing?

Thanks

Sep 30 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I think you want to use this as your format string:

{0:c2}

--
Mike

Mike McIntyre [MVP]
http://www.getdotnetcode.com
"jay" <jay@hot_mail.comwrote in message
news:ii********************************@4ax.com...
>I have a databound grid on my form. I edited the collection and set
the defaultCellStyle.Format = c2 on a particular column, but when I
enter 100 thats the way it is displayed in the grid. If the format is
c2 it is supposed to display $100.00. What am I missing?

Thanks

Oct 2 '07 #2

P: n/a
jay


Nope, that does not work. This is actually an unbound item added to
the databound grid. I am letting the user enter the $ amount, but it
is never displayed that way, even though the format is set to C2. Why
is this so difficult to format? and when are you supposed to do the
formatting.

On Tue, 2 Oct 2007 06:53:05 -0700, "Mike McIntyre"
<mi****@getdotnetcode.comwrote:
>I think you want to use this as your format string:

{0:c2}
Oct 7 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.