Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi friends,

I am using VS 2005,asp.net,c#
Thousand separators should display in gridview.
It should be based on the client user system's thousand separator settings present in the regional and language settings.
How to dothis?

tx in advance
george
Posted

read the httprequest.userlanguages array
http://msdn.microsoft.com/en-us/library/system.web.httprequest.userlanguages.aspx[^]
any int or decimal can be set
C#
ToString("#,0.00", CultureInfo.GetCultureInfo("en-US"))

Where you see en-US you set a value from the httprequest.userlanguages array
 
Share this answer
 
Try this:

C#
string comma = System.Threading.Thread.CurrentThread.CurrentUICulture.NumberFormat.NumberGroupSeparator;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900