We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

culture dependent number formatting

Thread ID:





61964 Jun 5,2007 01:39 PM UTC Jun 6,2007 05:59 PM UTC WinForms 3
Tags: GridControl
Vicko Hazdovac
Asked On June 5, 2007 01:39 PM UTC

Hi... I'm having trouble with the number formatting.

I want to display the number formatting with decimal and group separators defined in the current culture (System.Globalization.CultureInfo)

- the next code does nothing :
gridGroupingControl1.Culture = System.Globalization.CultureInfo.CurrentCulture;

the current culture is Croatian, and it seems that grid sets it's culture accordingly, but the number format remains unchanged.

How can I make it work?
I've attached a sample for you to modify.



haneefm [Syncfusion]
Replied On June 5, 2007 05:21 PM UTC

Hi Vicko,

You can try these code in a form's load event.

gridGroupingControl1.TableDescriptor.Appearance.AnyCell.Format = "C";
gridGroupingControl1.TableDescriptor.Appearance.AnyCell.CultureInfo = System.Globalization.CultureInfo.CurrentCulture; //new System.Globalization.CultureInfo("cs-CZ");

Best regards,

Vicko Hazdovac
Replied On June 6, 2007 09:54 AM UTC

this works fine, thank you
I just have one more question.

I don't want the user to be able to see the currency. I've tried using

CultureInfo cI = System.Globalization.CultureInfo.CurrentCulture;

cI.NumberFormat.CurrencySymbol = "";

but it's a read only property. Is there another way I can hide the currency symbol in the cells?

(I've seen that there is a CurrencyEdit property in the cell but I don't know actually how to use it)

thanks in advance

haneefm [Syncfusion]
Replied On June 6, 2007 05:59 PM UTC

Hi Vicko,

The CurrenyCells( \Syncfusion\EssentialStudio\\Windows\Grid.Windows\Samples\2.0\CellTypes\CurrencyCells\ ) browser sample will illustrate how you can use Syncfusion’s CurrencyEdit control in grid cells. The various options that are present will allow you to set the patterns which, are used to display positive and negative numbers, groupings, decimal separators and more. In addition, this sample will allow you to display an event log which, will show the order of the currentcell events that are raised and the values that are in the cell as the events occur. You will be able to see mouse events as well.

Best regards,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon