I'm using trial Q2 2009 controls with a RadNumericTextBox input for salary and have several issues:-
<telerik:RadNumericTextBox runat="server" ID="dataEarnedAnnualIncome" Text='<%# Bind("EarnedAnnualIncome") %>' NumberFormat-DecimalDigits="0" NumberFormat-AllowRounding="true" Tooltip="" /> |
1. I don't want any decimal places, however, no matter what I do the control allows me to enter several decimal places. I need the control to stop me enetring decimal places or limit it to the correct number like a masked control - how can I do this?
I've tried adding a OnClientBlur javascript function to disable the decimal point from input, which would only cater for numbers with no decimal places, but this doesn't work as none of the RadNumericTextBox validation then happens and I can enter non numeric text in the box - can my script be changed to make this work?
//Function to stop decimal point being input |
function StripDecimalPoint(sender, eventArgs) { |
var c = eventArgs.get_keyCode(); |
if (c == 46) { eventArgs._cancel = true; } |
return false; |
} |
2. The rounding is calculated incorrectly as rounding depends on the number of significant decimal places not just the values of the numbers. With no decimal places 0.45 should be rounded down to 0, however it is being rounded up to 1?
3. If I cannot limit the number of decimals the user inputs then its preferable to truncate the input, however, when I change the AllowRounding to false the input is not truncated but left exactly as entered by the user. Obvioulsy I'd prefer to stop the user being able to enter extra decimals but if I can't how do I need to change my line to get truncating to work?
If these are known issue when do you anticipate fixing them?
Thanks