Block keyboard input for numeric input

2 posts, 0 answers
  1. John
    John avatar
    7 posts
    Member since:
    Jun 2009

    Posted 08 Jun 2009 Link to this post

    I am not sure how to accomplish this.  I have a numeric control on a form with spin buttons.  I want to block the users from entering value directly into the text box and force them to only use the spin buttons.  I tried setting read only to true but that also disabled the spin buttons.
    Thanks in advanced

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 09 Jun 2009 Link to this post

    Hi John,

    Try the following approach in order to disable the input textbox and use the spin buttons for entering value.

    <telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" ShowSpinButtons="True">  
        <ClientEvents OnLoad="OnLoad" /> 

    <script type="text/javascript">  
    function OnLoad(sender, args)  
        sender._textBoxElement.disabled = true;  

Back to Top