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

MaskType Numeric

12 Answers 496 Views
MaskedEditBox
This is a migrated thread and some comments may be shown as answers.
Bradley Lane
Top achievements
Rank 1
Bradley Lane asked on 18 Mar 2009, 01:38 AM
Hi,

Just been playing with the MaskedEditBox and I have a few questions:

1. Why can't I use decimal places when is set the MaskType to Numeric?
2. How can I setup a mask to have a range of numbers before the decimal point but a fixed number of decimal places?
3. When using a Numeric MaskType, is there an easy way to set value ranges?

Thanks,
Brad

12 Answers, 1 is accepted

Sort by
0
Boyko Markov
Telerik team
answered on 20 Mar 2009, 12:26 PM
Hi Bradley Lane,

"Why can't I use decimal places when is set the MaskType to Numeric?"

Please take a look at our examples about mask box in our Demo application. There are mask boxes with numeric type of the mask. The shown string is based on the given value for the Value property, the given Mask and the Culture settings used in the control. You can control the decimal places setting a mask such as "d3" or "c5" with three or fire digits after the separator. I would like to ask you to describe in more details what exactly you have in mind with your first question.

" How can I setup a mask to have a range of numbers before the decimal point but a fixed number of decimal places?" - unfortunately you cannot. You can only set the range of numbers after the decimal point with the current version. I will consider very carefully adding this feature in the future versions of the control.

"When using a Numeric MaskType, is there an easy way to set value ranges?"
- If I understand correctly you mean something like Min and Max values. We do not support such functionality in the mask box at the moment. It just formats using datetime, numeric or standard type of masks (just as MS mask text box). However it would be great if we add a Value range.

I hope this helps. Please contact me again if you have any additional questions.

All the best,
Boyko Markov
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Bradley Lane
Top achievements
Rank 1
answered on 23 Mar 2009, 12:48 AM
Hi Markov,

Details regarding the Numeric Mask Type need to be included in the documentation!

Also note that "d3" did not give me 3 decimal places (3 whole numbers instead); "f3" did give me 3 decimal places and "c5" gave me 5 with a dollar sign as expected.

I'd like to formally request some additional features for use with numeric data:
1. When I press "." cursor should move to first decimal place (first digit past place holder)
2. Value Ranges (Similar to radSpinEditor)
3. Ability to use a combination of fixed and dynamic numeric places before and after the place holder

Thanks,
Brad
0
Boyko Markov
Telerik team
answered on 26 Mar 2009, 08:11 AM
Hello Bradley Lane,

The actual formatting strings ( masks ) are just passed as parameters to the ToString method. This means that when having a value like "123" and you format it as d3 you will have 123 after formatting, but when you format it with f3 you will have 123.000 for example.

Thank you about your suggestions. We will consider them for the future releases of the control.

Kind regards,
Boyko Markov
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
John Reynolds
Top achievements
Rank 1
answered on 01 Mar 2010, 10:17 PM
Hello,

Can I also be added to the list of when this will change?

Hitting the, "." key should place the cursor at the fixed area for decimal entry, and doesn't. Very bizarre behavior.
0
Boyko Markov
Telerik team
answered on 04 Mar 2010, 12:39 PM
Hello John Reynolds,

Thank you for contacting us.

We will do our best to add this feature in the future versions of the control. Hopefully, it will be available in Q1 SP1 release.

If you have more questions, please do not hesitate to contact us.


Kind regards,
Boyko Markov
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.
0
John Reynolds
Top achievements
Rank 1
answered on 01 Apr 2010, 07:29 AM
Did this make it to the lastest release? I don't believe I see any difference in how it operates.
I'm having to search for a control (I think DevExpress has an XtraEditors Library) due to that limitation.

Any chance it will be released soon?
0
Deyan
Telerik team
answered on 06 Apr 2010, 09:43 AM
Hello John,

Thanks for getting back to us and for your question.

I can confirm that this feature will be available in Q1 2010 SP1 which is due in about a week. Please, refer to our website for further details on this release.

Thanks for your time.

Greetings,
Deyan
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.
0
Stefan Urabl
Top achievements
Rank 1
answered on 14 Apr 2010, 01:16 PM
Hello

I would also need an answer to question 2.

I need a numeric maskedEditBox with up to 6 numbers before and two after the decimal point.

 I have installed Telerik Q1 2010 SP1 for Windows Forms today and I have still no idea how to define the mask.
The help files do not work at the moment and I could not find an answer in the online help.

Thanks in advance
0
Boyko Markov
Telerik team
answered on 16 Apr 2010, 05:28 PM

Hello Stefan Urabl,

1. In order to create a masked text box with 6 numbers before and 2 after the decimal point, you should use the MaskType property and set it to Standard. Then you need to use the following mask: 000000.00.

2. The Value ranges feature is still not implemented. I hope that we will have enough resources to implement it in the near future.

I hope this helps.

Regards,

Boyko Markov
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.
0
Accepted
Chad
Top achievements
Rank 1
answered on 14 May 2012, 09:49 PM
This may be old news now but I came across this thread as I searched for a way to set value ranges using DevEx tools.  I have a text box that should not allow the user to enter a number above 32500.  I was able to use a RegEx mask with the following to do just that.

([1-9])|([1-9][0-9])|([1-9][0-9][0-9])|([1-9][0-9][0-9][0-9])|([1-3][0-2][0-5][0][0])

It may not be the prettiest mask ever but it does the trick.
0
John Reynolds
Top achievements
Rank 1
answered on 14 May 2012, 10:43 PM
Thanks for sharing, I'm still subscribed to this thread and happy to learn there are other ways!
0
Peter
Telerik team
answered on 15 May 2012, 12:58 PM
Hello Chad,

Thank you for sharing your solution with the community. I have updated your Telerik points for the cooperation.

Kind regards,
Peter
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Tags
MaskedEditBox
Asked by
Bradley Lane
Top achievements
Rank 1
Answers by
Boyko Markov
Telerik team
Bradley Lane
Top achievements
Rank 1
John Reynolds
Top achievements
Rank 1
Deyan
Telerik team
Stefan Urabl
Top achievements
Rank 1
Chad
Top achievements
Rank 1
Peter
Telerik team
Share this question
or