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

RadNumericTextBox rounding...

1 Answer 308 Views
Input
This is a migrated thread and some comments may be shown as answers.
Raymond
Top achievements
Rank 1
Raymond asked on 20 Jun 2014, 06:35 PM
Hi,

Is there a way to prevent the user from entering more decimal places than specified in the decimal digits setting? 

There was another forum post asking something similar about the control automatically adjusting the value when the user enters something out of range.  Setting AllowOutOfRangeAutoCorrect="false" worked great to address the out of range problem.  Is there something along the lines of AllowRoundingAutoCorrect="false"?

If I set the Type="currency" and NumberFormat-DecimalDigits=2, then I would like the control to display the same sort of validation error as it does for an out of range entry.  Is that possible maybe with javascript?

And note...the default behavior for any control should NEVER be to just automatically change what the user enters to a valid value.

Thanks,

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 21 Jun 2014, 06:45 AM
Hi Raymond,

I guess you want to cancel the rounding of the entered value. You can set the AllowRounding="false" and KeepNotRoundedValue="true" .

ASPX:
<telerik:RadNumericTextBox ID="rntxtCurrency" runat="server" Type="Currency">
   <NumberFormat AllowRounding="false" KeepNotRoundedValue="true" DecimalDigits="2" />
</telerik:RadNumericTextBox>

Thanks,
Princy
Tags
Input
Asked by
Raymond
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or