Our not to be changed datalayer returns the DateTime.Mindate when the record’s column has a NULL value.
So when you put a null value in a record’s column and you read it again, you get 01-01-0001.
When binding this value to a DevExpress.XtraEditors.TextEdit control this value (01-01-0001) ofcourse is displayed in the control.
Now we want to show the control as being empty (no content), but i don’t know how to achieve that.
I did find out that you can set a custom display text for the control when the object’s attribute is NULL, but that doesn’t work ofcourse because the value is 01-01-0001 and not null.
So in short: if it’s a date with the value of 01-01-0001, show nothing in the control, otherwise, show the date.
Any ideas?
You could use a
DateEditcontrol instead of aTextEditSet the
NullDateproperty to1-1-0001Turn off the drop down button in the “Buttons” settings if you do not require it. It will then look just like a
TextEdit.