>I am trying to bind a mmTextbox to a date field on a windows Form. The field permits null. If the field contained a value at one time, how can the user clear out the value and set it to null?
Do you want to add a button or other control to the form that the user can use to clear the textbox or do you always want to set it to null if it's empty? You could do something like this in the form if you want the latter:
textBox1.DataBindings[0].Parse += new ConvertEventHandler(Form1_Parse);
private void Form1_Parse(object sender, ConvertEventArgs e)
{
if (e.Value.ToString() == string.Empty)
e.Value = DBNull.Value;
}
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com