Solved

Help

Posted on 2008-10-27
1
121 Views
Last Modified: 2013-11-26
Hi

I need to change the $ Currency that is applied in the gridview when U type {0:C} in the dataformatstring. I need it to be ª.
0
Comment
Question by:RahnLev
1 Comment
 
LVL 53

Accepted Solution

by:
Dhaest earned 500 total points
ID: 22819614
You'll need to change the current-culture in your program to the culture you need.
http://msdn.microsoft.com/en-us/library/87k6sx8t(VS.71).aspx
An example below
using System;

using System.Globalization;

using System.Threading;
 

public class EuroSymbolSample

{

   public static void Main()

   {

      int i = 100;
 

      // Set the CurrentCulture to French in France.

      Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR");
 

      // Display i formatted as default currency for the

      //	CurrentCulture.

      // On a version of Windows prior to Windows XP, where the user

      //    has not changed the default currency to euro through

      //    Control Panel, this will default to "F".

      Console.WriteLine(i.ToString("c"));
 

      // Set the CurrentCulture to French in France, using the

      //    CultureInfo constructor that takes a useUserOverride

      //    parameter.

      // Set the useUserOverride value to false.

      Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR", false);

         

      // Display i formatted as default currency for the 

      //    CurrentCulture.

      // On a version of Windows prior to Windows XP, this will

      //    override an incorrect default setting of "F" and display

      //    the euro symbol (i).

      Console.WriteLine(i.ToString("c"));     

   }

}

Open in new window

0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now