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

Formatting Numeric Text Box

1 Answer 42 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
Will
Top achievements
Rank 1
Will asked on 28 Jul 2015, 08:43 PM

I am trying to format the numeric text box so that it allows up to 8 decimal places and will not show trailing 0's. However this is a currency field and we would only like to show trailing 0's for the first two decimal places ( 20.00 we want instead of 20). I cannot seem to satisfy all of these requirements with the numeric text box control. This is what I have.

<telerik:RadNumericTextBox runat="server" EnabledStyle-HorizontalAlign="Right" ID="rtbPrice" NumberFormat-AllowRounding="False" NumberFormat-DecimalDigits="8" />​

 This will remove trailing 0's but will leave 20.00 showing as 20. Is there a way to do this?

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 30 Jul 2015, 12:24 PM
Hello Will,

I am not sure I understand your scenario completely. If you would like to display only the first two decimal digits you should set the DecimalDigits property to 2.


<telerik:RadNumericTextBox runat="server" EnabledStyle-HorizontalAlign="Right" ID="rtbPrice" NumberFormat-DecimalDigits="2" />​

In case I have misunderstood what you would like to achieve please describe the scenario in more detail. What are the requirements and what should be the expected result?

Regards,
Viktor Tachev
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
NumericTextBox
Asked by
Will
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or