The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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?
RCRajadurai C Syncfusion Team 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
EVEric van DinterJune 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
RCRajadurai C Syncfusion Team 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.