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

Radnumerictextbox Selectiononfocus

2 Answers 122 Views
Input
This is a migrated thread and some comments may be shown as answers.
vinoth sansar
Top achievements
Rank 2
vinoth sansar asked on 18 Aug 2011, 03:15 PM
Dear all,

   SelectionOnFocus="SelectAll" is not working. See the below code for reference. Amusing onblur and onfocus for multiply into 100 and divide by 100

thanks 
vinoth
<telerik:RadNumericTextBox ID="txtId" runat="server"  NumberFormat-DecimalDigits="8" NumberFormat-NegativePattern="-n%" NumberFormat-PositivePattern="n%"
                                        MaxLength="16"  NumberFormat-GroupSeparator="" SelectionOnFocus="SelectAll" Width="100px" EnabledStyle-HorizontalAlign="Right" >
                                        <ClientEvents OnBlur="Blur" OnFocus="Focus" />
                                      </telerik:RadNumericTextBox>

2 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 23 Aug 2011, 02:05 PM
Hi Vinoth,

I tried to replicate the described issue locally but to no avail.
 Could you please let me know which version of the controls are you using.
 Find attached a sample runnable application which demonstrates the correct behaviour of the mentioned property. When it is set to "SelectAll" the whole text is selected and if you start typing the old value is replaced by the new one. This is actually the default value of this property and if t is not set the controls behaves the same way.
Test the application on your side and let me know what the difference in your case is.

All the best,
Maria Ilieva
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
vinoth sansar
Top achievements
Rank 2
answered on 24 Aug 2011, 08:13 AM
Hi
   Thanks for your reply. I got a solution. In javascript am used below code.

function Focus(sender, args) {
            var input = sender.get_value();
           if (input.length != 0) {
                sender.set_value(input / 100);
                sender.focus();
                sender.selectAllText()
            }
        }

Thanks,
vinoth
Tags
Input
Asked by
vinoth sansar
Top achievements
Rank 2
Answers by
Maria Ilieva
Telerik team
vinoth sansar
Top achievements
Rank 2
Share this question
or