Cannot press enter inside a telerik input

4 posts, 1 answers
  1. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 06 Aug 2009 Link to this post

    Here is my input manager

            <telerik:NumericTextBoxSetting BehaviorID="NumericSettings"  EnabledCssClass="numeric" FocusedCssClass="numeric" InitializeOnClient="true" Type="Number" DecimalDigits="0" GroupSizes="3" GroupSeparator="," PositivePattern="n" NegativePattern="-n">  
                <TargetControls> 
                    <telerik:TargetInput ControlID="dummy1" /> 
                </TargetControls> 
            </telerik:NumericTextBoxSetting> 
            <telerik:NumericTextBoxSetting BehaviorID="DecimalSettings" EnabledCssClass="decimal" FocusedCssClass="decimal"  InitializeOnClient="true" Type="Number" DecimalDigits="1"  GroupSizes="3" GroupSeparator="," PositivePattern="n" NegativePattern="-n">  
                <TargetControls> 
                    <telerik:TargetInput ControlID="dummy2" /> 
                </TargetControls> 
            </telerik:NumericTextBoxSetting> 
            <telerik:TextBoxSetting BehaviorID="TextSettings" EnabledCssClass="ascii" FocusedCssClass="ascii" InitializeOnClient="true"  > 
                <TargetControls> 
                    <telerik:TargetInput ControlID="dummy3" /> 
                </TargetControls> 
            </telerik:TextBoxSetting> 
        </telerik:RadInputManager>

    When I press the enter key in my numeric and decimal text boxes, I get the invalid character warning.
    The ascii text box doesn't complain. The enter key doesn't do anything though. I'm not sure if it's supposed to do a commit or not. Anyway I don't think pressing enter in a numeric text box should give me a warning. Thanks.
  2. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 07 Aug 2009 Link to this post

    if a user leaves an input field blank/empty is there a way i can setup the input to default to 0 or something?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Daniel
    Admin
    Daniel avatar
    4943 posts

    Posted 12 Aug 2009 Link to this post

    Hello Matt,

    Straight onto your questions:

    "Anyway I don't think pressing enter in a numeric text box should give me a warning."
    Our developers will investigate the depicted behavior in a timely manner. Thank you for pointing out this issue - we updated your Telerik points.

    "if a user leaves an input field blank/empty is there a way i can setup the input to default to 0 or something?"

    Currently the "inputified" textbox doesn't accept zero as a value, but we will change this in the next release.

    Kind regards,
    Daniel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Daniel
    Admin
    Daniel avatar
    4943 posts

    Posted 12 Aug 2009 Link to this post

    Hello Matt,

    Regarding the default values:

    Download the latest internal build and try the following approach:
    <script type="text/javascript"
        function handleBlur(sender, args) 
        { 
            args.get_targetInput().set_value(0); 
        } 
    </script> 
    <asp:TextBox ID="dummy1" runat="server" Text="0" /> 
    <asp:TextBox ID="dummy2" runat="server" Text="0,0" /> 
    <telerik:RadInputManager ID="RadInputManager1" runat="server"
        <telerik:NumericTextBoxSetting BehaviorID="NumericSettings" EnabledCssClass="numeric" 
            ClientEvents-OnBlur="handleBlur" FocusedCssClass="numeric" InitializeOnClient="true" 
            Type="Number" DecimalDigits="0" GroupSizes="3" GroupSeparator="," PositivePattern="n" 
            NegativePattern="-n"
            <TargetControls> 
                <telerik:TargetInput ControlID="dummy1" /> 
            </TargetControls> 
        </telerik:NumericTextBoxSetting> 
        <telerik:NumericTextBoxSetting BehaviorID="DecimalSettings" EnabledCssClass="decimal" 
            ClientEvents-OnBlur="handleBlur" FocusedCssClass="decimal" InitializeOnClient="true" 
            Type="Number" DecimalDigits="1" GroupSizes="3" GroupSeparator="," PositivePattern="n" 
            NegativePattern="-n"
            <TargetControls> 
                <telerik:TargetInput ControlID="dummy2" /> 
            </TargetControls> 
        </telerik:NumericTextBoxSetting> 
    </telerik:RadInputManager> 

    Best regards,
    Daniel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top