Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

AJAX NumericUpDownExtender - Disable Manual Entry / Validation

$
0
0

Hi there,

This is a pretty straight-forward question, which I'm sure has a very easy answer that I'm just missing.

I have a textbox with an up/down control, with a minimum of 0 and maximum of 30. Currently, you can also put the cursor into the textbox and type in a value, so I also put in a FilteredTextBoxExtender that will ensure that only numbers can be entered.

It works exactly as advertised, except that it allows the user to enter number less than 0 and more than 30 if they put the cursor into the textbox and type it in.

Is there an easy way to keep the functionality that allows the user to manually edit the box, but ensure that if you type in a number like "200", that it resets it to 30?

I'm hoping there's a pre-existing, built-in solution, without me having to manually add some javascript code.


Plan B:

I'd rather not have to disable the textbox from user input, but if the above isn't possible, how do I do that and still maintain the up/down functionality? (The samples on the AJAX site work this way, but the setting to disable manual entry must be burried somewhere in the code, because I did a quick scan and couldn't find it.)


Thanks,

Aania


Viewing all articles
Browse latest Browse all 5678

Trending Articles