DateTimePicker

  • Thread starter Thread starter news.microsoft.com
  • Start date Start date
N

news.microsoft.com

Another DateTime Picker question!

But I simply can't find a proper athoritative answer anywhere.

I have the showcheckbox option of the datetimepicker enabled.

However, when a null value is passed to that control, the control is
selected by default and the check box is selected.

How can I configure it so that if it is a null value, the control is
unchecked.

Thanks
HS
 
Hi man,
at the ValueChange event of the DateTimePicker put the following code :
if (myPicker.Value == null)
{
myPicker.Checked = false;
}
else
myPicker.Checked = true;
hope that helps
 
Back
Top