Solved

Help

Posted on 2008-10-27
1
126 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

623 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