Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
More grid woes
Message
De
06/07/2005 13:50:59
 
 
À
06/07/2005 11:33:04
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
ASP.NET
Catégorie:
WebForms
Titre:
Versions des environnements
Environment:
ASP.NET
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01029008
Message ID:
01029621
Vues:
16
>Alex,
>Yeah not only Iformatprovider but .Net help is as clear as mud:)
>Try:
>
> dr[1]	= double.Parse(sValue, NumberStyles.Currency);
>
>PS: Add System.Globalization to using directives.
>Cetin


That certainly pointed me in the right direction. Changing the column format to string
dt.Columns.Add(new DataColumn("Value", typeof(String)));
and then later on
dr[1] = double.Parse(sValue, NumberStyles.Currency).ToString("C");
did it. They now show as currency in the grid even though it is entered as double. Go figure. But at least I can show the user now.

Thanks!


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform