Re: Using Null in DateTimePickers
From: Ignacio Machin \( .NET/ C# MVP \) ("Ignacio)
Date: 08/27/04
- Next message: Zürcher See: "Re: non blocking wait in C#"
- Previous message: ZhangZQ: "Re: How to use different color to display the item text in a ListView class with View property set to "details"?"
- In reply to: John Smith: "Using Null in DateTimePickers"
- Next in thread: John Smith: "Re: Using Null in DateTimePickers"
- Reply: John Smith: "Re: Using Null in DateTimePickers"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 27 Aug 2004 09:39:41 -0400
Hi Jon,
I want to add an approach that I used once in a web app, as DateTime does
not support null you need to define a null value inside its range, I
selected a date that was not possible in my domain ( I think you could also
use DateTime.MinDate ), so what I do is assign it as the selectedDate, but I
set the visible Date to today, therefore the controls is happy cause it has
a value and as this value is way outside the domain it will never be
displayed.
Maybe this does not solve your problem 100% but it may give you other
ideas.
Cheers,
-- Ignacio Machin, ignacio.machin AT dot.state.fl.us Florida Department Of Transportation "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: Zürcher See: "Re: non blocking wait in C#"
- Previous message: ZhangZQ: "Re: How to use different color to display the item text in a ListView class with View property set to "details"?"
- In reply to: John Smith: "Using Null in DateTimePickers"
- Next in thread: John Smith: "Re: Using Null in DateTimePickers"
- Reply: John Smith: "Re: Using Null in DateTimePickers"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
Loading