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

How do i validate "valid" decimal value with Radmaskedtextbox

1 Answer 257 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ramesh
Top achievements
Rank 1
Ramesh asked on 23 May 2012, 03:01 PM

Hi Team,

We are using masked textbox in few important places in our system for different type of input validation.

Now, i am dead stuck with how to i validate the "Valid" Decimal value with masked text box.

"#" or "9" format must need the that many number of digits.

e.g. valid decimal numbers are:
111.124
11.12455
11111.12455

Making mask "######.######" like that, must require user to type in leading "0(zero)", which is real pain.

If you could be of any help solving this mystry will be great help.

Thanks,
J. Ramesh

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 24 May 2012, 03:10 PM
Hello Ramesh,

Note that by design RadMaskedTextBox is supposed to be used when user input should be limited to specific characters only. The control does not fit very well in numeric input validation scenarios.  Instead, I would suggest that you utilize the RadNumericTextBox control which is especially designed to work with numeric values. It provides properties like MinValue(MaxValue), DecimalDigits and NumberFormat which you can successfully use to achieve your goal.

Regards,
Martin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
General Discussions
Asked by
Ramesh
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or