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


1 Answer 45 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
woutercop asked on 08 Sep 2010, 01:07 PM

I need to make a input numeric textbox where only thousands are allow, and minimum value 5000

for example 5000, 7000, 10.000, ....

if some gives in 7300 if has to be rounded to 7000, if 259200 to 259000 >> so rounded to the nearest 1000

i have tried to do the first step (check if it is a thousand) with a 

telerik:radnumerictextbox MinValue="5000" ClientEvents-OnKeyPress="" Culture="nl-BE" id="txtBedrag" runat="server">  


<NumberFormat DecimalDigits="0" />


<ClientEvents OnValueChanged="OnValueChanged" />














script type="text/javascript">








OnValueChanged(sender, eventArgs)



var number = aspnetForm.ctl00_ContentPlaceHolder1_txtBedrag_text.value;  




if (number % 1000 > 0)  


return false;








but this doenst do anyhting, if someone can help me, please let me know !


1 Answer, 1 is accepted

Sort by
Telerik team
answered on 08 Sep 2010, 01:48 PM
Hello Wouter,

You should use the ValueChanging client event.

You can check what is the value of the get_newValue() property in the event arguments and if necessary, set the modified value to the set_newValue() property (again in the event arguments).

Generally, the value of the RadInput textboxes should not be manipulated with DOM opeartions (e.g. some_id.value = something), but only by using client API methods, as demonstrated in the documentation.

Let me know if there is anything unclear.

the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question