Make TextBox Portion of NumericTextBox Read Only

2 posts, 1 answers
  1. Kerry
    Kerry avatar
    25 posts
    Member since:
    Jun 2013

    Posted 17 Jul 2013 Link to this post

    Is it possible to have the NumericTextBox control work ONLY with the buttons? To disallow typing in the TextBox portion?
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 18 Jul 2013 Link to this post

    Hi Kerry,

    Please have a look into the following code I tried to disable typing in the RadNumericTextBox.

    ASPX:
    <telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" ClientEvents-OnKeyPress="OnKeyPress">
    </telerik:RadNumericTextBox>

    JavaScript:
    <script type="text/javascript">
        function OnKeyPress(sender, args) {
            args.set_cancel(true);
        }
    </script>

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top