This is a migrated thread and some comments may be shown as answers.

RadNumericTextBox width two decimal separators

3 Answers 187 Views
Input
This is a migrated thread and some comments may be shown as answers.
Gautier Lemolgat
Top achievements
Rank 1
Gautier Lemolgat asked on 31 May 2010, 12:18 PM
Hello,

Is it possible for a RadNumericTextBox to accept two different decimal separators dot and comma ?

Thanks,

Gautier

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 03 Jun 2010, 08:42 AM
Hi Gautier,

Unfortunately the control logic does not allow the usage of two decimal separators in one input control. I hope this limitation is not causing you much inconvenience. If any other questions arise, please let us know.

Best wishes,
Maria Ilieva
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
arnaud
Top achievements
Rank 1
answered on 21 Oct 2010, 10:18 AM
Hi,

I think you should consider allowing both comma and dot.
In France for example the common decimal separator is comma but using a desktop keaboard people will use the dot as it is more accessible.
However, using a laptop (no numeric pad on the right) people will use the comma as you have to shift + tape to make a dot.

Thanks
Arnaud
0
arnaud
Top achievements
Rank 1
answered on 21 Oct 2010, 11:00 AM
Hack to make it work with both comma and dot :

 
<telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server"
           onkeydown="keydown(event)">
           <NumberFormat GroupSeparator="" DecimalSeparator="."/>
       </telerik:RadNumericTextBox>
       <script type="text/javascript">
 
           function keydown(e) {
 
               if (e.keyCode == 188) {
                   $find("RadNumericTextBox1")._textBoxElement.value = find("RadNumericTextBox1")._textBoxElement.value.replace(",", "") + ".";
                   return false;
               }
           }
 
       </script>
Tags
Input
Asked by
Gautier Lemolgat
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
arnaud
Top achievements
Rank 1
Share this question
or