Hello,
I am getting complaints from customers that they are able to enter decimals into a NumericUpDown field defined to accept only integers.
The user is not able to enter a "." at the end of the string, but they are able to enter it in the middle of the string.
For our particular scenario, this gives the data-entry clerk a difficult time depending on where/what value was mistakenly entered/rounded.
Can we have some sort of property on the control to restrict "." altogether?
I am getting complaints from customers that they are able to enter decimals into a NumericUpDown field defined to accept only integers.
<
telerik:RadNumericUpDown
IsInteger
=
"True"
NumberDecimalDigits
=
"0"
/>
The user is not able to enter a "." at the end of the string, but they are able to enter it in the middle of the string.
For our particular scenario, this gives the data-entry clerk a difficult time depending on where/what value was mistakenly entered/rounded.
Can we have some sort of property on the control to restrict "." altogether?
5 Answers, 1 is accepted
0
Hello,
We are not aware of such issue in the current version of RadNumericUpDown.
Could you give us more details about the culture in which entering a dot in the middle the input causes a decimal value to be parsed in the control. By design if the culture's decimal separator is for example dot entering a comma is allowed but the value is not parsed as decimal. If you want to remove the dot and comma as separators no matter of the current culture of the environment you could set the NumberDecimalSeparator, CurrencyDecimalSeparator and PercentDecimalSeparator to a special symbol that is less likely to be entered. The next code snippet shows the how to set those properties using the loaded event of the control to a '™' symbol:
and the event:
Hope this is helpful.
Regards,
Vladi
Telerik
We are not aware of such issue in the current version of RadNumericUpDown.
Could you give us more details about the culture in which entering a dot in the middle the input causes a decimal value to be parsed in the control. By design if the culture's decimal separator is for example dot entering a comma is allowed but the value is not parsed as decimal. If you want to remove the dot and comma as separators no matter of the current culture of the environment you could set the NumberDecimalSeparator, CurrencyDecimalSeparator and PercentDecimalSeparator to a special symbol that is less likely to be entered. The next code snippet shows the how to set those properties using the loaded event of the control to a '™' symbol:
<
telerik:RadNumericUpDown
x:Name
=
"theNubmericUpDown"
Loaded
=
"theNubmericUpDown_Loaded"
IsInteger
=
"True"
NumberDecimalDigits
=
"0"
/>
and the event:
private
void
theNubmericUpDown_Loaded(
object
sender, RoutedEventArgs e)
{
var numericUpDown = sender
as
RadNumericUpDown;
numericUpDown.NumberFormatInfo =
new
NumberFormatInfo();
numericUpDown.NumberFormatInfo.NumberDecimalSeparator =
"™"
;
numericUpDown.NumberFormatInfo.CurrencyDecimalSeparator =
"™"
;
numericUpDown.NumberFormatInfo.PercentDecimalSeparator =
"™"
;
numericUpDown.NumberFormatInfo.NumberGroupSeparator =
""
;
numericUpDown.NumberFormatInfo.CurrencyGroupSeparator =
""
;
numericUpDown.NumberFormatInfo.PercentGroupSeparator =
""
;
}
Hope this is helpful.
Regards,
Vladi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
answered on 11 Dec 2013, 04:11 PM
Vladi,
I have the same problem, where I can enter a dot at the beginning or in the middle of the RadNumericUpDown.
The dot is parsed, because if I have 1.1 as a value, tabbing outside the control changes the value to 1.
The NumberDecimalSeparator value is empty. If I set it to *, I can enter this char, but no more a dot.
This really a bug of the control.
I'm currently using the Swiss French culture.
Patrick
I have the same problem, where I can enter a dot at the beginning or in the middle of the RadNumericUpDown.
The dot is parsed, because if I have 1.1 as a value, tabbing outside the control changes the value to 1.
The NumberDecimalSeparator value is empty. If I set it to *, I can enter this char, but no more a dot.
This really a bug of the control.
I'm currently using the Swiss French culture.
Patrick
0
Hello Patrick,
I tried to reproduce the issue with the latest assemblies, but with no success. I am attaching a short video of my attempt. Could you please review it and let me know if I am missing something.
Regards,
Konstantina
Telerik
I tried to reproduce the issue with the latest assemblies, but with no success. I am attaching a short video of my attempt. Could you please review it and let me know if I am missing something.
Regards,
Konstantina
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
answered on 15 Dec 2013, 06:39 AM
Konstantina,
you're not able to reproduce the problem, because you're not reading what the problem is. As already said by Rob and myself:
Patrick
you're not able to reproduce the problem, because you're not reading what the problem is. As already said by Rob and myself:
- You can not enter a decimal point at the end of the text (it's working correctly and that's your test case).
- You can enter a decimal point at the middle or at the beginning of the text (it's not working and you didn't try it).
Patrick
0
Accepted
Hi Patrick,
Sorry for the misunderstanding.
I have logged this issue in our feedback portal where you could track its status: http://feedback.telerik.com/Project/143/Feedback/Details/88489-disable-entering-separators-signs-in-numericupdown-when-isinteger-true
Regards,
Konstantina
Telerik
Sorry for the misunderstanding.
I have logged this issue in our feedback portal where you could track its status: http://feedback.telerik.com/Project/143/Feedback/Details/88489-disable-entering-separators-signs-in-numericupdown-when-isinteger-true
Regards,
Konstantina
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>