We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

MaskedEditBox - Date formated - support of DBNull?

Thread ID:





42900 Apr 10,2006 08:50 AM UTC Apr 12,2006 09:59 AM UTC WinForms 1
Tags: Tools
Gerlinde Rohen
Asked On April 10, 2006 08:50 AM UTC

Hallo, is there any possibility to enable a MaskedEditBox(date-formated) for DBNULL? And than is there also a chance to ''clear'' a date to DBNULL by pressing Backspace or Delete? It read, that in a DateTimePickerAdv DBNULL values can be enabled by setting EnableNullDate=true. Thanks Gerlinde Rohen

Vijayanand S [Syncfusion]
Replied On April 12, 2006 09:59 AM UTC

Hi Gerlinde, I am afraid, there is no possiblity to enable the DBNULL value in our current implementation of MaskedEditBox. As a workaround, you can derive a custom MaskedEditBox and override the ProcessCmdKey method inorder to delete all the contents in the textbox when the user presses the Del key. Here is the code snippet of derived control: public class DateMaskedEditBox:Syncfusion.Windows.Forms.Tools.MaskedEditBox { protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if(keyData ==Keys.Delete && this.Text!=String.Empty) { this.Text=String.Empty; this.SetSelection(0,1); } return base.ProcessCmdKey (ref msg, keyData); } } Please take a look at the attached sample and let me know if you have any questions. Thanks for your interest in Syncfusion products. Regards, Vijay Project3.zip


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon