RadNumericTextBox - point blocked

2 Answers 81 Views
NumericTextBox
Vincent
Top achievements
Rank 1
Iron
Iron
Vincent asked on 13 Jul 2021, 12:22 PM

I've found a bug, it's strange but it's working if i remove a parameter.

I'm french and i've got an application made since year and use Telerik 2017.3 (same in recent) the problem was found by a user who use "point" in numeric pad.

I know this problem was resolved since years, and other website in my society. but i've searched why is again present. and make sample to find difference and remove parameter by parameter of RadNumericTextbox to find who blocked :

Originale code

<telerik:RadNumericTextBox ID="rntbMontantMensuel" runat="server" Enabled="true" IncrementSettings-InterceptArrowKeys="False" IncrementSettings-InterceptMouseWheel="False" DataType="Currency" ShowSpinButtons="false" MinValue="0" NumberFormat-DecimalDigits="2" RenderMode="Auto" EnabledStyle-Width="220px" EmptyMessage="0 " EnabledStyle-HorizontalAlign="right" FocusedStyle-HorizontalAlign="right" ReadOnlyStyle-HorizontalAlign="Center" HoveredStyle-HorizontalAlign="right" Type="Currency" AutoPostBack="true" ClientEvents-OnFocus="disableValide" ClientEvents-OnBlur="enableValide" NumberFormat-KeepNotRoundedValue="True"></telerik:RadNumericTextBox>

Code worked :

<telerik:RadNumericTextBox ID="rntbMontantMensuel" runat="server" Enabled="true"  IncrementSettings-InterceptMouseWheel="False" DataType="Currency" ShowSpinButtons="false" MinValue="0" NumberFormat-DecimalDigits="2" RenderMode="Auto" EnabledStyle-Width="220px" EmptyMessage="0 " EnabledStyle-HorizontalAlign="right" FocusedStyle-HorizontalAlign="right" ReadOnlyStyle-HorizontalAlign="Center" HoveredStyle-HorizontalAlign="right" Type="Currency" AutoPostBack="true" ClientEvents-OnFocus="disableValide" ClientEvents-OnBlur="enableValide" NumberFormat-KeepNotRoundedValue="True"></telerik:RadNumericTextBox>

Yes if i've IncrementSettings-InterceptArrowKeys="False"

when user press "." in numeric pad, i've got an icon "block" (red cross inside circle) and don't change my point to coma (French decimal separator)

 

2 Answers, 1 is accepted

Sort by
0
Attila Antal
Telerik team
answered on 16 Jul 2021, 10:01 AM

Hello Vincent,

If you want to use the comma "," as the decimal separator in the NumericTextBox, you will need to configure that in the control.

<telerik:RadNumericTextBox ID="rntbMontantMensuel" runat="server"
    NumberFormat-DecimalSeparator=",">
</telerik:RadNumericTextBox>

RadNumericTextBox does not replace the dot "." with a comma "," 

You will need to make sure the keyboard button sends a comma "," to the TextBox instead of a dot "."

Regards,
Attila Antal
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Vincent
Top achievements
Rank 1
Iron
Iron
answered on 16 Jul 2021, 12:01 PM

Hello Attila,

 

No, the DecimalSeparator is automated with culture, i've just found solution just before your post.

It's a combination of two parameters :

IncrementSettings-InterceptArrowKeys is optional and by default is true

if i remove this parameter it's work but i've got up & down key add or subtract 1 and i dont't want this (for user errors)

and now i know why, because when this optional parameter is true is used optional parameter :

IncrementSettings-Step and default value is 1

if i set this parameter to 0 all are good.

The problem is combination of two default value of optional parameters.

Thanks for your help !

 

Tags
NumericTextBox
Asked by
Vincent
Top achievements
Rank 1
Iron
Iron
Answers by
Attila Antal
Telerik team
Vincent
Top achievements
Rank 1
Iron
Iron
Share this question
or