Hello,
A little briefing:
In most of the pages in my web site we need to show always the same currency symbol but for different culture,
Eg.: User culture is "en-US", but the currency symbol for the currency that I have to display is £, I need to use the currency symbol position, thousand and decimal separator from the culture, but the £ currency symbol. I solved this scenario by:
That's working very well, the problem comes when I have multiple currencies in the same grid.
I have a "Currency" type that basically have the "Value" and "CurrencySymbol" properties, I could do something like:
But it will not have the right Currency position (right, left, right with space, left with space), thousand and decimal separator.
While I was writing this post I just figured out that I can solve by:
Is there any other approach?
Also, how do I configure the Filter to work with "PropertyOfTypeCyrrency.Value" in this case?
For this "Currency" type I've override the "ToString()", and also I have the DisplayTemplate, is there any way to use one of those with "ClientTemplate"?
Thanks in Advanced!
A little briefing:
In most of the pages in my web site we need to show always the same currency symbol but for different culture,
Eg.: User culture is "en-US", but the currency symbol for the currency that I have to display is £, I need to use the currency symbol position, thousand and decimal separator from the culture, but the £ currency symbol. I solved this scenario by:
kendo.culture(
"en-US"
);
kendo.culture().numberFormat.currency.symbol =
"£"
;
That's working very well, the problem comes when I have multiple currencies in the same grid.
I have a "Currency" type that basically have the "Value" and "CurrencySymbol" properties, I could do something like:
columns.Bound(c => c.PropertyOfTypeCyrrency).ClientTemplate(
" #= PropertyOfTypeCyrrency.CurrencySymbol # #= PropertyOfTypeCyrrency.Value #"
);
But it will not have the right Currency position (right, left, right with space, left with space), thousand and decimal separator.
While I was writing this post I just figured out that I can solve by:
columns.Bound(c => c.PropertyOfTypeCyrrency).ClientTemplate(
"#= kendo.toString(PropertyOfTypeCyrrency.Value, 'C').replace(kendo.culture().numberFormat.currency.symbol, PropertyOfTypeCyrrency.CurrencySymbol) #"
);
Is there any other approach?
Also, how do I configure the Filter to work with "PropertyOfTypeCyrrency.Value" in this case?
For this "Currency" type I've override the "ToString()", and also I have the DisplayTemplate, is there any way to use one of those with "ClientTemplate"?
Thanks in Advanced!