Hi!, how can set the currency and date formats in ui-grid?
I found the cellFilter: {currency} but are getting this default? format: 1.000,00 € how can change to: 1,000.00 $?,
thanks!
5 Answer(s)
-
0
Hi,
I think ui-grid uses angularJs's currency filter <a class="postlink" href="https://docs.angularjs.org/api/ng/filter/currency">https://docs.angularjs.org/api/ng/filter/currency</a>. So, if you want a different behaviour than this one, you can create a custom angularJs filter and use it in ui-grid column.
Thanks.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi, thank you, after I read that article, how can handle the user location?, where can set that?, or how aspnetzero handle that?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi,
You can use "abp.localization.currentLanguage.name" on the client side.
Thanks.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi.. I just want to change the language, but not the date or currency format of the entire app, how can achieve this?, thanks
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi,
ABP's default implementation sets both CurrentCulture and CurrentUICulture here <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/master/src/Abp.Web/Web/Localization/CurrentCultureSetter.cs#L114">https://github.com/aspnetboilerplate/as ... er.cs#L114</a>
If you want to change that, you need to create a new current culture setter class deriving from CurrentCultureSetter in above link and override it's SetCurrentCulture method just to set CurrentUICulture
Currency and date format will be retrieved from CurrentCulture property. You can set it to a default one which you want to use in this method as well.
protected virtual void SetCurrentCulture(string language) { Thread.CurrentThread.CurrentUICulture = CultureInfoHelper.Get(language); }Thanks.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)