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
I think you want to use this as your format string:
{0:c2}

Signature
Mike
Mike McIntyre [MVP]
http://www.getdotnetcode.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
jay - 07 Oct 2007 01:20 GMT
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.
>I think you want to use this as your format string:
>
>{0:c2}