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

Redisplaying invalid model with IntegerTextBox

4 Answers 79 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kelly
Top achievements
Rank 1
Kelly asked on 14 Sep 2010, 10:11 PM
Hello,

Since the IntegerTextBox doesn't prevent out-of-range values from being typed in, they can be submitted. Now the model validates this invalid value and the view is supposed to be redisplayed with the model including the invalid values to allows for corrections. However, the IntegerTextBox throws an exception because the invalid value is outside the min/max range. How can I redisplay the invalid value in an IntegerTextBox for user correction?

Thanks,
Kelly

4 Answers, 1 is accepted

Sort by
0
Peter
Top achievements
Rank 1
answered on 15 Sep 2010, 09:26 AM
Hi,

Check this online demo. It implements the same functionality.

Regards,
Peter
0
Kelly
Top achievements
Rank 1
answered on 15 Sep 2010, 01:16 PM
Hello,

It does work for a NumericTextBox, but not for an IntegerTextBox.

Kelly
0
Peter
Top achievements
Rank 1
answered on 15 Sep 2010, 01:58 PM
Hi,

I am pretty sure that everything works as expected. I've used Telerik's QSF examples as a test project. Here is a screencast which shoes that everything is OK on my end.

Regards,
Peter
0
Kelly
Top achievements
Rank 1
answered on 15 Sep 2010, 02:25 PM
Hello,

Thanks for the response. To be more precise, I'm referring to IntegerTextBoxFor, with a model property that has a Range attribute. 

Thanks,
Kelly
Tags
NumericTextBox
Asked by
Kelly
Top achievements
Rank 1
Answers by
Peter
Top achievements
Rank 1
Kelly
Top achievements
Rank 1
Share this question
or