Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 128
  • Last Modified:

Help

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
RahnLev
Asked:
RahnLev
1 Solution
 
DhaestCommented:
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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now