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

RadNumericTextbox to allow only set of values

2 Answers 109 Views
Input
This is a migrated thread and some comments may be shown as answers.
Stalin
Top achievements
Rank 1
Stalin asked on 17 Jun 2013, 04:21 PM
Hi ,

Am working on RadNumericTextBox to enable users to enter values allowed through the spin buttons only.

Example: The control should have min value  as 10 and max value as 80 and increment by 10, so the control should allow only 10,20,30,40,50,60,70 and 80 as the allowed values and should show error message on violating this.

How this functionality can be achieved ?

Thanks,
Stalin 

2 Answers, 1 is accepted

Sort by
0
Resopi
Top achievements
Rank 1
answered on 17 Jun 2013, 07:51 PM
Hi, 

i don't knows if this is the bast way, but i made this... 

        $telerik.$($('#controlName_text'))<br>
            .focusin(function () { this.readOnly = true; })<br>
            .focusout(function () { this.readOnly = false; });


bye
0
Shinu
Top achievements
Rank 2
answered on 18 Jun 2013, 04:40 AM
Hi,

Try setting MinValue,MaxValue and IncrementSettings-Step as shown below.

ASPX:
<telerik:RadNumericTextBox    IncrementSettings-Step="10" ShowSpinButtons="true"  MinValue="10"   MaxValue="80"   ID="RadNumericTextBox1"    runat="server"
 <NumberFormat GroupSeparator="" DecimalDigits="0" />
</telerik:RadNumericTextBox>

Thanks,
Shinu.
Tags
Input
Asked by
Stalin
Top achievements
Rank 1
Answers by
Resopi
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or