Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB.NET
|
VB.NET General VB.NET discussions for issues that don't fall into other VB.NET forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 2nd, 2004, 09:08 PM
Authorized User
 
Join Date: Jul 2003
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Default DateTimePicker Save/Display Null Values

I need a DateTimePicker in my Form but can save/display a null value.
say, Date Pawned: Not Nullable, Date Payed:Nullable
I can do this by having datetime picker and Textbox or label pass values to each other and then hide the other but I think the better way to handle this is by making an ocx or userconrol just dont know to do it.

Can anyone help me with this? code or link pertaining to this topic would really be appreciated also im pretty sure alot of newbies would like to know or have this code.

Thanks

__________________
Proud To Be Pinoy
 
Old August 6th, 2007, 01:58 AM
Kia Kia is offline
Authorized User
 
Join Date: Jun 2007
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Wow... I just did a search on a couple of issues I have and found endless related posts like this one. All unanswered or some smart guy suggested somthing totally unrelated to the problem.

Sites like this only work if there are people assigned to answer questions, because every other member is here to GET answers.
 
Old August 6th, 2007, 10:32 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Kia,

There are many people who monitor these forums and answer questions quite regularly. But occasionally, we simply don't have an answer.

-Peter
 
Old August 7th, 2007, 03:45 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Kia, you don't know what you're talking about. Every site like this that I participate in has a group of users all trying to answer questions; no one is assigned.

It is fun to help, and is a feather in your cap to have the answer.

So let me try here. reyboy, could you explain in more detail what you want to do? (Keep in mind that what you post needs to lay out the problem—you already know the problem, we need to be “brought up to speed.” But on the other end of the spectrum, no one wants to read a book.)

Please read your post before posting it to make sure it is clear. (Your first post isn't. “I need a DateTimePicker in my Form...” is a statement of need, not an action phrase. “...but can save/display a null value” is a second or alternate action, requiring an action before it. Something like “My from can’t read a value {an action issue}, but can save a null value {an alternate action}.”
I think you meant “I need a DateTimePicker in my Form but I need to be able to save/display a null value.” Re-reading your post might have caused you to expand that sentence a little (maybe).

Anyway, I'd like to see if I can help, if you'll just clarify a bit.
 
Old August 9th, 2007, 09:49 AM
Registered User
 
Join Date: Aug 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am also trying to do something similar.

I have a customized DateTimePicker that I have put into a DataGridViewCell. The DateTimePicker has a Custom format for the date and has the check box enabled. What I want to do is setup this DateTimePicker to go blank or null when the check box is not checked. Then, the DateTimePicker needs to be able to save as a null value.
I have tried overriding the Value property and making it a nullable(of date) but then when going back to the base class it can't have a null value.
Ideas?

 
Old August 25th, 2007, 04:11 AM
Registered User
 
Join Date: Aug 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The dateTimePicker cannot display null values. It only displays values between the Min and the Max date.

There are many solutions to displaying and returning a null value from a
datetimepicker.

One of the solutions is highlited right here.
http://www.dotnet247.com/247referenc...54/270422.aspx

The coder must however test these solutions because they introduce subtle bugs into your code such as validation failures





Similar Threads
Thread Thread Starter Forum Replies Last Post
display Null or Not an object error kishy449 Classic ASP Professional 1 September 4th, 2007 01:21 PM
Avoid null display ajaidass ADO.NET 2 January 17th, 2007 03:54 PM
display no heading if null oleafo ASP.NET 1.0 and 1.1 Basics 1 January 8th, 2007 06:23 PM
Display all NULL columns hm_naveen Oracle 2 January 5th, 2007 09:50 AM
Null values jmcgranahan BOOK: Access 2003 VBA Programmer's Reference 0 August 29th, 2006 02:25 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.