Null Value in Masked Edit Box

5 posts, 0 answers
  1. Brian
    Brian avatar
    14 posts
    Member since:
    Oct 2010

    Posted 02 Nov 2011 Link to this post

    I see posts from 2008 and 2009 about the masked edit box not supporting null values
    (http://www.telerik.com/community/forums/winforms/maskededitbox/value-cannot-be-set-to-null.aspx)

    Is this still true?  It is a little misleading to see "0.0000" in a edit box when the real value is null.

    In my situation, the mask type is "numeric" and the mask is "n4".  The "nulltext" property doesn't seem to have any effect.

    Is there any workaround to blanking the edit box when the value is null?
  2. Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 03 Nov 2011 Link to this post

    Hi Brian,

    Thank you for writing back. Please excuse me for the caused inconvenience.

    RadMaskedEditBox accepts null as its Value. When such is set, the control will display the string stored in the NullText property of the control. If NullText contains an empty string, setting the Value of the control to null will show an empty editor.

    Let me know if you need anything else.

    Regards,
    Stefan
    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. Brian
    Brian avatar
    14 posts
    Member since:
    Oct 2010

    Posted 04 Nov 2011 Link to this post

    It didn't seem to work in my project - databinding with null values show "0.0000" in the masked edit box.

    I'm working on a simple sample project.  If I can duplicate the problem in a simple project then hopefully I can figure out where it is not working.  I'm on vacation next week so it will be a little while before I can respond.
  5. Brian
    Brian avatar
    14 posts
    Member since:
    Oct 2010

    Posted 04 Nov 2011 Link to this post

    Here is a sample project.  It databinds to a nullable decimal property.
    If you use the buttons, you can see it update with a real value, but when you try to set it back to null, the RadTexbox goes to blank but the RadMaskedEditBox goes to "0.0000".

    Any idea on what I'm doing wrong?

    I created a support ticket so I could attach my sample:

    Thank you for submitting your inquiry to the Telerik Support.

    Your ticket ID is: 480208 (view all your support tickets)

  6. Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 09 Nov 2011 Link to this post

    Hi Brian,

    I am copying the same answer from your support ticket here, in case someone from the community is looking for the same feature:

    We are aware of this issue and it is already resolved in our internal development branch. The fix will be shipped out in the upcoming Q3 2011 release, which is expected by the end of the next week. 

    Kind regards,
    Stefan
    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.

Back to Top
UI for WinForms is Visual Studio 2017 Ready