Hi Feifan,
Thanks for contacting Syncfusion forums.
Query: “The thing is it is too trouble some to do this with all the columns, is there anyway to set the negative number properly once for all?”
Yes. You can achieve your requirement by defining the NegativeCurrencyFormat of CultureInfo in the startup.cs file. Refer the below code example.
[startup.cs]
|
public void ConfigureServices(IServiceCollection services)
{
services.AddRazorPages();
services.AddServerSideBlazor();
services.AddSingleton<WeatherForecastService>();
services.Configure<RequestLocalizationOptions>(options =>
{
options.DefaultRequestCulture = new RequestCulture("en-US");
options.DefaultRequestCulture.Culture.NumberFormat.CurrencyNegativePattern = 1;
});
services.AddSyncfusionBlazor();
} public void Configure(IApplicationBuilder app, IWebHostEnvironment env) {. . . . . . . .. app.UseRequestLocalization(); // #endregion. . . . . . .. }
|
Note: Kindly ignore the solution provided in the Forum 150622, if you want to apply the negative format for all the grids and numbers.
Kindly get back to us if you have further queries.
Regards,
Vignesh Natarajan.