I have a grid with a column that is bound to a text field. This text is usually a number, but is sometimes a "-" character.
When exporting to Excel, I would like for the numbers to display with a single digit after the decimal point. So integers are displayed as #.0... (100.0 for example). I have the following style declaration:
It doesn't seem to work. The exported Excel file always shows 100 as 100, not 100.0.
I am wondering if this is because the underlying grid column data field is text? Is there any way to format the numeric output of a grid column that isn't bound to a numeric field?
When exporting to Excel, I would like for the numbers to display with a single digit after the decimal point. So integers are displayed as #.0... (100.0 for example). I have the following style declaration:
Dim pctStyle As New Telerik.Web.UI.GridExcelBuilder.StyleElement("PctStyle")
pctStyle.AlignmentElement.HorizontalAlignment = GridExcelBuilder.HorizontalAlignmentType.Right
pctStyle.NumberFormat.FormatType = GridExcelBuilder.NumberFormatType.GeneralNumber
pctStyle.NumberFormat.Attributes("ss:Format") = "0.0"
It doesn't seem to work. The exported Excel file always shows 100 as 100, not 100.0.
I am wondering if this is because the underlying grid column data field is text? Is there any way to format the numeric output of a grid column that isn't bound to a numeric field?