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

RadNumericTextBox - showing all decimal digits in edit mode?

2 Answers 76 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Mark DeMichele
Top achievements
Rank 1
Mark DeMichele asked on 11 Apr 2008, 10:08 PM
Hi,

I have a page with a RadNumericTextBox with NumberFormat-DecimalDigits=2.

Suppose I have the value "1.95". In display mode, it shows 1.95 which is correct. When I focus and go into edit mode, I get 1.95. That's also correct.

But if I have a value of "1.00", it doesn't display the .00 in edit mode. It only displays 1. Is there a way to get it to display all the decimal places, even if they are zeros? It looks and feels very odd to the user since it displays 1.00 but changes to 1 when editing. Thanks!

2 Answers, 1 is accepted

Sort by
0
Accepted
plamen
Top achievements
Rank 1
answered on 14 Apr 2008, 08:43 AM
hi: )

Here is an example how to achieve your goal

            <script type="text/javascript"
            function RadNumericTextBox1_Focus(sender, args) 
            { 
                sendersender._textBoxElement.value = sender.get_displayValue(); 
            } 
            </script>         
            <telerik:RadNumericTextBox Value="1" ID="RadNumericTextBox1" runat="server"
                <ClientEvents OnFocus="RadNumericTextBox1_Focus" /> 
            </telerik:RadNumericTextBox> 

Regards...
<John:Peel />


0
Mark DeMichele
Top achievements
Rank 1
answered on 14 Apr 2008, 02:11 PM
Thanks. That solution works great!
Tags
Editor
Asked by
Mark DeMichele
Top achievements
Rank 1
Answers by
plamen
Top achievements
Rank 1
Mark DeMichele
Top achievements
Rank 1
Share this question
or