Hi Feifan,
Greetings from Syncfusion support.
Query: “ how can we override it and setting it to 1? Or we can only use Formatter to manually put a string "-" before the formatted data ?”
We suggest you to achieve your requirement (to display negative sign with currency symbol) using Column Template feature of Grid. Inside the template you can change the Current CultureInfo like below.
<Template>
@{
var ord = (context as Order).Freight;
CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;
CultureInfo newCulture = new CultureInfo("en-US");
newCulture.NumberFormat.CurrencyNegativePattern = 1;
Thread.CurrentThread.CurrentCulture = newCulture;
<span>@ord.ToString("C2")</span>
}
</Template>
</GridColumn> |
Refer our UG documentation for your reference
Please get back to us if you have further queries.
Regards,
Vignesh Natarajan.