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

Cannot press enter inside a telerik input

3 Answers 102 Views
Input
This is a migrated thread and some comments may be shown as answers.
towpse
Top achievements
Rank 2
towpse asked on 06 Aug 2009, 09:05 PM
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.

3 Answers, 1 is accepted

Sort by
0
towpse
Top achievements
Rank 2
answered on 07 Aug 2009, 03:43 PM
if a user leaves an input field blank/empty is there a way i can setup the input to default to 0 or something?
0
Accepted
Daniel
Telerik team
answered on 12 Aug 2009, 10:09 AM
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.
0
Daniel
Telerik team
answered on 12 Aug 2009, 03:17 PM
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.
Tags
Input
Asked by
towpse
Top achievements
Rank 2
Answers by
towpse
Top achievements
Rank 2
Daniel
Telerik team
Share this question
or