Beginner question with RadInput control

2 posts, 0 answers
  1. Mark Brown
    Mark Brown avatar
    5 posts
    Member since:
    Oct 2008

    Posted 24 Jul 2009 Link to this post

    I would like to use the RadInput control to create a numeric "spinner" so users can select a value between 0 and 25.  However, I haven't figured out how to do it.  I don't want the users to type, simple click on the up/down arrows to select a value

    Can anyone give me a hint on how to fix my code that follows:

    <telerik:RadNumericTextBox ShowSpinButtons="true" Label="HH:" runat="server" ID="ddHH"
     Width="100px" DataType="System.Int32" MaxLength="2" MaxValue="24" MinValue="0"
                                                        ReadOnly="True" Value="24" NumberFormat-DecimalDigits="0">
    </telerik:RadNumericTextBox>
  2. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 24 Jul 2009 Link to this post

    Hello Mark,

    Please try the following modification:
    <telerik:RadNumericTextBox ShowSpinButtons="true" Label="HH:" runat="server" ID="ddHH" 
        Width="100px" DataType="System.Int32" MaxLength="2" MaxValue="24" MinValue="0" 
         Value="24" NumberFormat-DecimalDigits="0" ClientEvents-OnKeyPress="function(sender, args) { args.set_cancel(true); }"
    </telerik:RadNumericTextBox> 

    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