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 / Windows Forms / WinForm Data Binding / February 2006

Tip: Looking for answers? Try searching our database.

DataGridView CellStyle Format

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steini - 15 Feb 2006 12:45 GMT
Hello,

my int values in a column should look like "34 m³". I tried to set the
Format Property of the DefaultCellstyle from the column to "0 m³" or "0\"
m³\"". The DataGridView displays it correct, but when I edit the value "34
m³" by deleting the first number to "4 m³" I get an ParsingError. It works
when I delete all inclusive "m³" and writing "4" in the cell.
I also tried a standard Format for example "C2". This works perfect!

Is this a bug or did I something wrong??

Regards,

Jürgen Steinmetz
Bart Mermuys - 15 Feb 2006 16:00 GMT
Hi,

> Hello,
>
[quoted text clipped - 6 lines]
>
> Is this a bug or did I something wrong??

AFAIK it can only parse some basic formattings.  So you need to handle
DataGridView.CellParsing and parse the string to a number yourself.

If you have any problems doing this, let me know.

HTH,
Greetings

> Regards,
>
> Jürgen Steinmetz
Steini - 16 Feb 2006 17:21 GMT
Thank You - now all works fine!

> Hi,
>
[quoted text clipped - 20 lines]
> >
> > Jürgen Steinmetz

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.