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

Make TextBox Portion of NumericTextBox Read Only

1 Answer 65 Views
Input
This is a migrated thread and some comments may be shown as answers.
Kerry
Top achievements
Rank 1
Kerry asked on 17 Jul 2013, 05:12 PM
Is it possible to have the NumericTextBox control work ONLY with the buttons? To disallow typing in the TextBox portion?

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 18 Jul 2013, 07:10 AM
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.
Tags
Input
Asked by
Kerry
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or