Re: Using Null in DateTimePickers
From: Nicholas Paldino [.NET/C# MVP] (mvp_at_spam.guard.caspershouse.com)
Date: 08/27/04
- Next message: Ori: "MessageBox with KeyUp and Form with KeyPreview"
- Previous message: John Smith: "Using Null in DateTimePickers"
- In reply to: John Smith: "Using Null in DateTimePickers"
- Next in thread: Tom Porterfield: "Re: Using Null in DateTimePickers"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 27 Aug 2004 09:06:36 -0400
John,
Unfortunately, the DateTimePicker doesn't support this. The best way to
do this is to have a checkbox to indicate whether or not it has a value.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
"John Smith" <js@no.com> wrote in message
news:u$PtFYDjEHA.1712@TK2MSFTNGP09.phx.gbl...
> Hey folks,
>
> I have a DateTimePicker control on my Windows Form. Whenever I either:
> a) Don't give it a value
> b) Set it's value to Null
> c) Set it's value to ""
> It makes the date today's date.
>
> I need it to be empty though. How do I make it empty? It represents a
> field in my database which legitimately can be null and so I can't show it
> as todays date.
>
> Thanks a lot for the help!
>
>
>
> (I posted a similar message a couple of days ago without a response, but
> it's really important and time is of the essence so I'm trying again)
>
>
- Next message: Ori: "MessageBox with KeyUp and Form with KeyPreview"
- Previous message: John Smith: "Using Null in DateTimePickers"
- In reply to: John Smith: "Using Null in DateTimePickers"
- Next in thread: Tom Porterfield: "Re: Using Null in DateTimePickers"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|