This question is locked. New answers and comments are not allowed.
is it possible to use jQuery.telerik.cultureInfo Clientside to format numbers?
my example;
in controller I set the CurrentThread.CurrentCulture to 'fr-FR'
then set Globalization(true) on the ScriptRegistrar
then I add a numerictextbox with a client side change event which updates a div to display the value that was entered;
and the javascript
really I will have multiple numerictextboxes and the div will be displaying the sum of all values
everything works perfectly - values in the numerictextbox display in fr-FR format 7,77
but the clientside object e.newValue will contain the en-US value 7.77 - this is good because I can easily add the value to other numbers, etc...
but when I set the display of the div I want to apply the same formatting that the numbertextbox is using
Does telerik expose any clientside helper methods that I can use in conjunction with the jQuery.telerik.cultureInfo object to get my formatting displayed in the users culture?
Thanks in advance
- Jesse
my example;
in controller I set the CurrentThread.CurrentCulture to 'fr-FR'
then set Globalization(true) on the ScriptRegistrar
then I add a numerictextbox with a client side change event which updates a div to display the value that was entered;
@Html.Telerik(
).NumericTextBox(
).Name("Hours"
).ClientEvents(events =>
events.OnChange("onChangeHours")
)
and the javascript
function
onChangeHours(e) {
$(
'total-hours-div'
).text(e.newValue);
}
really I will have multiple numerictextboxes and the div will be displaying the sum of all values
everything works perfectly - values in the numerictextbox display in fr-FR format 7,77
but the clientside object e.newValue will contain the en-US value 7.77 - this is good because I can easily add the value to other numbers, etc...
but when I set the display of the div I want to apply the same formatting that the numbertextbox is using
Does telerik expose any clientside helper methods that I can use in conjunction with the jQuery.telerik.cultureInfo object to get my formatting displayed in the users culture?
Thanks in advance
- Jesse