This question is locked. New answers and comments are not allowed.
I am guessing this issue is not unique to Telerik NumericTextBox and my knowledge of asp.mvc is still limited so maybe the solution is really straight forward?
The scenario: Logged on user is fr-FR culture so numbers are displayed / entered using comma instead of period for decimal
example 5.55 (en-US) vs 5,55 (fr-FR)
when the from is submitted the values come across still in the logged on users format, makes sense because this is just a HTTP Post of all the form data and those input text have data with a comma
given 2 Telerik NumberTextBoxes on my form Hours_1, Hours_2
logged on users enters data
Hours_1: 1,11
Hours_2: 2,22
then an update action in the controller
notice when I specify that it will be a double vs a string it becomes null
it would be nice if there was an easy way to transform from the logged on users format before the action executed
one work around is that if the form is submitted using ajax I can retrieve the 'real' value using the clientside api
it would be nice to not be forced into using an ajax submission
does anyone have experience with this same issue?
Thanks,
- Jesse
The scenario: Logged on user is fr-FR culture so numbers are displayed / entered using comma instead of period for decimal
example 5.55 (en-US) vs 5,55 (fr-FR)
when the from is submitted the values come across still in the logged on users format, makes sense because this is just a HTTP Post of all the form data and those input text have data with a comma
given 2 Telerik NumberTextBoxes on my form Hours_1, Hours_2
logged on users enters data
Hours_1: 1,11
Hours_2: 2,22
then an update action in the controller
public ActionResult Update(string Hours_1, double? Hours_2) { System.Diagnostics.Debug.Write(Hours_1); // 2,22 System.Diagnostics.Debug.Write(Hours_2); // null return null; }notice when I specify that it will be a double vs a string it becomes null
it would be nice if there was an easy way to transform from the logged on users format before the action executed
one work around is that if the form is submitted using ajax I can retrieve the 'real' value using the clientside api
$('#Hours_2').data('tTextBox').value();it would be nice to not be forced into using an ajax submission
does anyone have experience with this same issue?
Thanks,
- Jesse