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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Formatting cell text as currency

Thread ID:

Created:

Updated:

Platform:

Replies:

93973 Apr 14,2010 07:46 PM UTC Jun 18,2010 02:41 PM UTC ASP.NET Web Forms (Classic) 3
loading
Tags: Grouping
Kristopher Lilley
Asked On April 14, 2010 07:46 PM UTC

What's the best way to format cells that initially just contain a decimal number as currency? I assume it's something that would be done in the QueryCellStyleInfo event, but I'm having trouble finding the appropriate property to use to apply the formatting. Anyone have any idea how this should be done?

Thanks,
Kris

Rajadurai C [Syncfusion]
Replied On April 15, 2010 05:28 PM UTC

Hi Kris,

Thanks for your interest in Syncfusion Products.

To display the text of a grid cell in Currency format, you need to the set the GridStyleInfo.CellType property to "Currency". Please refer to our browser sample shipped with Syncfusion Dashboard in the path, Grid samples -> Cell Types -> Currency Cell Demo.

In this sample, the use of this celltype has been illustrated. Also, the format to the currency text with this celltype can be set through GridStyleInfo.CurrencyEdit property.

Regards,
Rajadurai

Eric van Dinter
Replied On June 17, 2010 12:38 PM UTC

Hello,

I have another question about a currency cell.

I want to have a distinction between an empty cell and a cell with value = 0.

How can I arrange that ?

Thanks in advance,

Eric

Rajadurai C [Syncfusion]
Replied On June 18, 2010 02:41 PM UTC

Hi Eric,

Thanks for your interest in Syncfusion Products.

To maintain a distinction between empty cell and a cell with value '0', you can make use of GridStyleInfo.CurrencyEdit.NullString property.

Setting this property to string.Empty will let you mantain a difference between these two cases.

GridStyleInfo style = this.gridControl1[1,1];
style.CellType = "Currency";
style.CurrencyEdit.NullString = string.Empty;


This difference was implemented in our code library and will be available in our upcoming release Volume 3 2010 which can be expected in the mid of July 2010.

Regards,
Rajadurai

CONFIRMATION

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.

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

;