nullable DateTimePicker

    Date: 06/28/06 (C Sharp)    Keywords: database, web

    I need to use a number of DateTimePicker controls on a Windows Forms 2.0 database-linked application that I'm putting together.

    The DateTimePicker control doesn't support null values, and despite trying to work around it for many hours and trying numerous 'solutions' found on the web, I'm still no closer to a fix than when I started.

    A null value for a date field in the database currently yields a control with todays date entered in.  Whereas it needs to be obvious in the application that no date has yet been entered.

    Also, if a record has say a birth date entered in, and then another record is switched to which has a null value for that birth date field, then the birth date field remains unchanged (making it appear that record 2 has the same birth date as record 1, even though in actuality - no birth date has yet been chosen for record 2).

    The variety of solutions on the web seem to be pretty much all pre-.Net 2.0, and don't have the desired result on .Net 2.0. 

    Can anyone help me out here?  Many thanks in advance!

    Source: http://community.livejournal.com/csharp/68011.html

« double databind || Changing test data »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home