This is a migrated thread and some comments may be shown as answers.

[Solved] Formatting currency not correct

0 Answers 22 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mike
Top achievements
Rank 1
Mike asked on 02 May 2012, 03:10 PM
Hi 

I am using a grid to show cost comparisons.  Here is the declaration for one of the series.  Note the Format values for both Label and Tooltip.
series.Bar(new decimal[] { (Model.CostOfAppendedMessagesPrinted) }).Name("Printed").Color("orange").Labels(labels => labels.Format("{0:C}").Visible(true).Margin(-50)).Tooltip(t => t.Format("Appended messages printed cost {0:C}"));

This results in a $ sign.  However, I am in the UK.  It should be £.

The non-grid code
<p>The costs above were calculated using a notional cost per message of @Html.DisplayFor(model => model.CostPerPage)</p>
 returns a £ sign as expected, taking account of the annotation in the view model
[DisplayFormat(DataFormatString = "{0:c}")]

Am I doing something wrong or is this a bug?

Thanks
Tags
Grid
Asked by
Mike
Top achievements
Rank 1
Share this question
or