Date Time Picker

  • Thread starter Thread starter Brian P. Hammer
  • Start date Start date
B

Brian P. Hammer

All,

I have a datetimepicker that is bound to a dataset in SQL with a date/time value. The problem I am running into to is that if a user has not completed a step, they will not need a date displayed in the control. In this case, I get a null system exception error. How does one go about not showing a date in the control if a user does not pick one without generating the error?
 
Hi,

Here is a post that includes source for a control derived from DateTimePicker, the code is in VB (VB.NET), but it should be easy enough to translate should you require a C# version.

TinyURL : http://tinyurl.com/22g9b

Original link : http://groups.google.com/groups?hl=...=##[email protected]&rnum=2

Hope this helps

--
Chris Taylor
http://dotnetjunkies.com/WebLog/chris.taylor/
All,

I have a datetimepicker that is bound to a dataset in SQL with a date/time value. The problem I am running into to is that if a user has not completed a step, they will not need a date displayed in the control. In this case, I get a null system exception error. How does one go about not showing a date in the control if a user does not pick one without generating the error?
 
Thanks Chris. I tried this but it had an error I could not resolve. Anyway, I figured out that Component One >net Controls (Free from MSDN) has one of the controls that does exactly what I needed and then some.

--
Brian P. Hammer
Hi,

Here is a post that includes source for a control derived from DateTimePicker, the code is in VB (VB.NET), but it should be easy enough to translate should you require a C# version.

TinyURL : http://tinyurl.com/22g9b

Original link : http://groups.google.com/groups?hl=...=##[email protected]&rnum=2

Hope this helps

--
Chris Taylor
http://dotnetjunkies.com/WebLog/chris.taylor/
All,

I have a datetimepicker that is bound to a dataset in SQL with a date/time value. The problem I am running into to is that if a user has not completed a step, they will not need a date displayed in the control. In this case, I get a null system exception error. How does one go about not showing a date in the control if a user does not pick one without generating the error?
 
Back
Top