RadMaskedEditBox - Custom Numeric Masks

5 posts, 1 answers
  1. Marco
    Marco avatar
    87 posts
    Member since:
    Apr 2011

    Posted 26 Nov 2012 Link to this post

    Hello,

    I have some trouble with RadMaskedEditBox using Numeric Masks.
    When I use a standard Numeric Mask like "c2" or "N", it's working.
    When I try to use any Custom Numeric Mask like "#,##.00 'CHF'" or a simple "0" I'm getting in trouble (can't type anything in the maskedbox !).

    My final purpose is to have a mask for Swiss Currency typing (independant of culture, so I can't use the standard currency).
    Some examples: "120.00 CHF", "1'420.15 CHF".

    I actually use a workaround with the "N2" mask and a label for my "CHF".

    Thanks
  2. Answer
    Peter
    Admin
    Peter avatar
    1148 posts

    Posted 29 Nov 2012 Link to this post

    Hi Marco,

    Thank you for writing.

    These custom masks are not supported by RadMaskedEditBox. Please refer to this help articles that describe the mask characters that can be used in the Standard MaskType. 

    As a suggestion for you scenario you can set explicitly the Culture property to Swiss:
    radMaskedEditBox.Culture = new System.Globalization.CultureInfo("fr-CH");
    then set the MaskType property to Numeric and the Mask to "C2".

    I hope this helps.

    All the best,
    Peter
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Marco
    Marco avatar
    87 posts
    Member since:
    Apr 2011

    Posted 29 Nov 2012 Link to this post

    Hello Peter,

    Thank you for explicity Culture trick. That's all in need for my situation!

    Perhap's you should update this documentation:

    http://www.telerik.com/help/winforms/editors-maskededitbox-numeric-masks.html

    Because it's talking about full supported custom numeric Mask according to your answer it's only Standard Numeric Mask!
  5. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 04 Dec 2012 Link to this post

    Hello Marco,

    Thank you for writing back.

    We will research this case and we will update the documentation accordingly.

    Do not hesitate to contact us if you have other questions.

    Greetings,
    Peter
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
  6. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 24 Jan 2013 Link to this post

    Hi Marco,

    I am writing back to inform you that these custom masks are not supported. 
    We updated the documentation accordingly.

    Do not hesitate to contact us if you have other questions.

    Regards,
    Peter
    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Back to Top
UI for WinForms is Visual Studio 2017 Ready