DateTimePicker

  • Thread starter news.microsoft.com
  • 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
 
N

Nassos

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top