Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / October 2007

Tip: Looking for answers? Try searching our database.

dataGrid

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jay - 30 Sep 2007 01:33 GMT
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
Mike McIntyre - 02 Oct 2007 14:53 GMT
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}

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.