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

Null Value in Masked Edit Box

4 Answers 206 Views
MaskedEditBox
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 02 Nov 2011, 06:10 PM
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?

4 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 03 Nov 2011, 04:51 PM
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.

0
Brian
Top achievements
Rank 1
answered on 04 Nov 2011, 04:22 PM
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.
0
Brian
Top achievements
Rank 1
answered on 05 Nov 2011, 01:55 AM
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)

0
Stefan
Telerik team
answered on 09 Nov 2011, 02:12 PM
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.

Tags
MaskedEditBox
Asked by
Brian
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Brian
Top achievements
Rank 1
Share this question
or