MaskType Numeric

13 posts, 1 answers
  1. Bradley Lane
    Bradley Lane avatar
    22 posts
    Member since:
    Aug 2012

    Posted 17 Mar 2009 Link to this post

    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
  2. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 20 Mar 2009 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Bradley Lane
    Bradley Lane avatar
    22 posts
    Member since:
    Aug 2012

    Posted 22 Mar 2009 Link to this post

    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
  5. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 26 Mar 2009 Link to this post

    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.
  6. John Reynolds
    John Reynolds avatar
    32 posts
    Member since:
    Sep 2008

    Posted 01 Mar 2010 Link to this post

    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.
  7. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 04 Mar 2010 Link to this post

    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.
  8. John Reynolds
    John Reynolds avatar
    32 posts
    Member since:
    Sep 2008

    Posted 01 Apr 2010 Link to this post

    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?
  9. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 06 Apr 2010 Link to this post

    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.
  10. Stefan Urabl
    Stefan Urabl avatar
    4 posts
    Member since:
    Feb 2010

    Posted 14 Apr 2010 Link to this post

    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
  11. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 16 Apr 2010 Link to this post

    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.
  12. Answer
    Chad
    Chad avatar
    1 posts
    Member since:
    May 2012

    Posted 14 May 2012 Link to this post

    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.
  13. John Reynolds
    John Reynolds avatar
    32 posts
    Member since:
    Sep 2008

    Posted 14 May 2012 Link to this post

    Thanks for sharing, I'm still subscribed to this thread and happy to learn there are other ways!
  14. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 15 May 2012 Link to this post

    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 >>
Back to Top
UI for WinForms is Visual Studio 2017 Ready