IP Mask doesn't produce valid IP address

6 posts, 0 answers
  1. John
    John avatar
    9 posts
    Member since:
    Sep 2011

    Posted 17 Nov 2011 Link to this post

    I've just replaced a competitor's IP address mask input control with Telerik's Winforms 2011 Q2 and I'm disapointed with the functionality. Dropping the RadMaskedEditBox in place with MaskType = IP presented two problems:

    When typing an IP address of 10.5.2.97 (with periods) it ends up '10 .5 .2 .97' in the box and requires custom reformatting to remove embedded spaces to make it into a valid IP address. Am I missing something? 

    Second and much more minor issue is that I could not find an easy way to make this controls blue border look the same as standard .NET controls of black; changing the Theme to ControlDefault did not work.
  2. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 21 Nov 2011 Link to this post

    Hello John,

    Thank you for writing.

    In order to get the RadMaskedBox's Value property without spaces you should set TextMaskFormat property to ExcludePromptAndLiterals.

    this.radMaskedEditBox1.TextMaskFormat = MaskFormat.ExcludePromptAndLiterals;

    As to the second question, please open at design time the RadMaskedEditBox Smart Tag (refer to the attached screenshot) and click Edit UI elements, then select Border Primitive and set ForeColor to the desired color. 

    I hope this helps.

     Best wishes,
    Peter
    the Telerik team

    Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

  3. UI for WinForms is Visual Studio 2017 Ready
  4. John
    John avatar
    9 posts
    Member since:
    Sep 2011

    Posted 21 Nov 2011 Link to this post

    This property does not exist (at least I could not find it in the documentation or  Object Browser):

    this
    .radMaskedEditBox1.TextMaskFormat = MaskFormat.ExcludePromptAndLiterals;


    I'm using the latest version of this control (Winforms 2011 Q3). Please advise.  Thanks.
  5. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 22 Nov 2011 Link to this post

    Hi John,

    Thank you for writing back.

    We introduced this property in Q3 2011 (exact version 2011.3 11.1116)

    The TextMaskFormat property determines how the literal and prompt characters in the mask are processed when the generating the Value Property. 

    I hope this helps.

    Regards,
    Peter
    the Telerik team

    Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

  6. John
    John avatar
    9 posts
    Member since:
    Sep 2011

    Posted 12 Mar 2012 Link to this post

    There are two issues with using ExcludingPromptAndLiterals:
    1) this property must be set at runtime, always defaults to IncludePromptAndLiterals if set to something else at design time.
    2) How can this produce a valid IP address (my original request) whe the literals are removed. Try inputing 10.1.1.5 and you'll get 10115 returned. Changing it to IncludeLiterals does not help, back to square one.

  7. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 15 Mar 2012 Link to this post

    Hi John,

    Thank you for contacting us.

    I can confirm the issue with TextMaskFormat - it will be addressed in our next release scheduled for the next week.

    For IP Mask you should set the TextMaskFormat property to MaskFormat.IncludeLiterals in order to keep the delimiters between IP parts - we will consider providing a more convenient way for this in one of the future releases.

    Please excuse us for the inconvenience. I have added points to your account for the reports. Do not hesitate to contact us if you have other questions.

    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