Radnumerictextbox Selectiononfocus

3 posts, 0 answers
  1. vinoth sansar
    vinoth sansar avatar
    33 posts
    Member since:
    May 2010

    Posted 18 Aug 2011 Link to this post

    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

    <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" />
  2. Maria Ilieva
    Maria Ilieva avatar
    4017 posts

    Posted 23 Aug 2011 Link to this post

    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 >>

  3. vinoth sansar
    vinoth sansar avatar
    33 posts
    Member since:
    May 2010

    Posted 24 Aug 2011 Link to this post

       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);

Back to Top