473,387 Members | 1,624 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

DateTimePicker + DataBinding + Null-Value: THE solution?

Hi,

I'm looking for a DateTimePicker that supports 100% databinding (and support
null-values)...
It's a shame that the normal control doesn't, but when searching on the
internet, I didn't find any solution that works without problems.

Does anybody know where I can find an inherited DateTimePicker that supports
databinding and nulll-values? Any links, sample code etc would be really
appreciated! It can be for VB.NET 2005, in case that would make the task
easier...

Thanks a loty in advance,

Pieter
Feb 27 '06 #1
7 2553
Pieter,

You can take this sample, and than use instead of the textbox the
datetimepicker.

You have to change a little bit. The datetimepicker has to bind to the
property "value", while in some places where now the values are returned as
text should be returned as value. (Not to string by instance or and instead
of "" nothing)

http://www.vb-tips.com/default.aspx?...9-4deb7fa4a0b8

I see that I use "datum" that is Dutch for date, maybe I will change that in
future to make it less confusing for you.

I hope this helps,

Cor
"Pieter" <pi**********@hotmail.com> schreef in bericht
news:%2***************@TK2MSFTNGP12.phx.gbl...
Hi,

I'm looking for a DateTimePicker that supports 100% databinding (and
support null-values)...
It's a shame that the normal control doesn't, but when searching on the
internet, I didn't find any solution that works without problems.

Does anybody know where I can find an inherited DateTimePicker that
supports databinding and nulll-values? Any links, sample code etc would be
really appreciated! It can be for VB.NET 2005, in case that would make the
task easier...

Thanks a loty in advance,

Pieter

Feb 27 '06 #2
"Pieter" <pi**********@hotmail.com> schrieb:
I'm looking for a DateTimePicker that supports 100% databinding (and
support null-values)...


Untested:

<URL:http://www.grazioli.ch/Blog/PermaLink.aspx?guid=c4a63d35-71f9-4b02-9de7-0c87e5b1c770>

Nullable DateTimePicker
<URL:http://www.codeproject.com/cs/miscctrl/Nullable_DateTimePicker.asp>

(For a translation to VB.NET, take a look at the comments section of the
page.)

You may want to set the 'ShowCheckBox' property to 'True' and use the
checkbox as a null value indicator (if 'Checked' is 'False', no date is
selected). Notice that the 'ShowCheckBox' property is flawed and thus this
is not the best way.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 27 '06 #3
Cor,
| I see that I use "datum" that is Dutch for date, maybe I will change that
in
| future to make it less confusing for you.
Why?

In english (at least US english): "datum" means a single piece of "data".

http://www.dictionary.net/datum

So in this case it "works".
--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
| Pieter,
|
| You can take this sample, and than use instead of the textbox the
| datetimepicker.
|
| You have to change a little bit. The datetimepicker has to bind to the
| property "value", while in some places where now the values are returned
as
| text should be returned as value. (Not to string by instance or and
instead
| of "" nothing)
|
|
http://www.vb-tips.com/default.aspx?...9-4deb7fa4a0b8
|
| I see that I use "datum" that is Dutch for date, maybe I will change that
in
| future to make it less confusing for you.
|
| I hope this helps,
|
| Cor
|
|
| "Pieter" <pi**********@hotmail.com> schreef in bericht
| news:%2***************@TK2MSFTNGP12.phx.gbl...
| > Hi,
| >
| > I'm looking for a DateTimePicker that supports 100% databinding (and
| > support null-values)...
| > It's a shame that the normal control doesn't, but when searching on the
| > internet, I didn't find any solution that works without problems.
| >
| > Does anybody know where I can find an inherited DateTimePicker that
| > supports databinding and nulll-values? Any links, sample code etc would
be
| > really appreciated! It can be for VB.NET 2005, in case that would make
the
| > task easier...
| >
| > Thanks a loty in advance,
| >
| > Pieter
| >
|
|
Feb 27 '06 #4
CMM
Yeah, technically "data" is a plural and only a plural. So correct usage is
to say "the data *are* wrong" or "the data *are* in that file." But, nobody
does that nowadays. "Data" is treated as singular noun. This was a pet-peeve
of an overly intellectual boss of mine a few years ago.

--
-C. Moya
www.cmoya.com

"Jay B. Harlow [MVP - Outlook]" <Ja************@tsbradley.net> wrote in
message news:O4**************@tk2msftngp13.phx.gbl...
Cor,
| I see that I use "datum" that is Dutch for date, maybe I will change
that
in
| future to make it less confusing for you.
Why?

In english (at least US english): "datum" means a single piece of "data".

http://www.dictionary.net/datum

So in this case it "works".
--
Hope this helps
Jay [MVP - Outlook]
.NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
| Pieter,
|
| You can take this sample, and than use instead of the textbox the
| datetimepicker.
|
| You have to change a little bit. The datetimepicker has to bind to the
| property "value", while in some places where now the values are returned
as
| text should be returned as value. (Not to string by instance or and
instead
| of "" nothing)
|
|
http://www.vb-tips.com/default.aspx?...9-4deb7fa4a0b8
|
| I see that I use "datum" that is Dutch for date, maybe I will change
that
in
| future to make it less confusing for you.
|
| I hope this helps,
|
| Cor
|
|
| "Pieter" <pi**********@hotmail.com> schreef in bericht
| news:%2***************@TK2MSFTNGP12.phx.gbl...
| > Hi,
| >
| > I'm looking for a DateTimePicker that supports 100% databinding (and
| > support null-values)...
| > It's a shame that the normal control doesn't, but when searching on
the
| > internet, I didn't find any solution that works without problems.
| >
| > Does anybody know where I can find an inherited DateTimePicker that
| > supports databinding and nulll-values? Any links, sample code etc
would
be
| > really appreciated! It can be for VB.NET 2005, in case that would make
the
| > task easier...
| >
| > Thanks a loty in advance,
| >
| > Pieter
| >
|
|

Feb 27 '06 #5
"CMM" <cm*@nospam.com> schrieb:
Yeah, technically "data" is a plural and only a plural. So correct usage
is to say "the data *are* wrong" or "the data *are* in that file." But,
nobody does that nowadays. "Data" is treated as singular noun. This was a
pet-peeve of an overly intellectual boss of mine a few years ago.


In German the singular is "das Datum" and the plural is "die Daten", but
"Datum" is rarely used in current German language for this purpose. Instead
it's mainly used equivalently to "date" in English.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 27 '06 #6
Jay,

Thanks, I did not know that and find it fine to know.

In Dutch Datum is only used as a singulair for Date. The pluriform of that
is official Data. Although most people use Datums now to make it not more
confusing as it already is. Probably a nice shift in of the original meaning
of the word. I assume in English because for what Herfried wrote about the
German language. German is the second from the most important Germanic
languages while Dutch is the thirth (before you misunderstand English is the
first in that).

And because I like this, did I find your comment fine to know. Maybe I go
examine this deeper.

Cor

"Jay B. Harlow [MVP - Outlook]" <Ja************@tsbradley.net> schreef in
bericht news:O4**************@tk2msftngp13.phx.gbl...
Cor,
| I see that I use "datum" that is Dutch for date, maybe I will change
that
in
| future to make it less confusing for you.
Why?

In english (at least US english): "datum" means a single piece of "data".

http://www.dictionary.net/datum

So in this case it "works".
--
Hope this helps
Jay [MVP - Outlook]
.NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
| Pieter,
|
| You can take this sample, and than use instead of the textbox the
| datetimepicker.
|
| You have to change a little bit. The datetimepicker has to bind to the
| property "value", while in some places where now the values are returned
as
| text should be returned as value. (Not to string by instance or and
instead
| of "" nothing)
|
|
http://www.vb-tips.com/default.aspx?...9-4deb7fa4a0b8
|
| I see that I use "datum" that is Dutch for date, maybe I will change
that
in
| future to make it less confusing for you.
|
| I hope this helps,
|
| Cor
|
|
| "Pieter" <pi**********@hotmail.com> schreef in bericht
| news:%2***************@TK2MSFTNGP12.phx.gbl...
| > Hi,
| >
| > I'm looking for a DateTimePicker that supports 100% databinding (and
| > support null-values)...
| > It's a shame that the normal control doesn't, but when searching on
the
| > internet, I didn't find any solution that works without problems.
| >
| > Does anybody know where I can find an inherited DateTimePicker that
| > supports databinding and nulll-values? Any links, sample code etc
would
be
| > really appreciated! It can be for VB.NET 2005, in case that would make
the
| > task easier...
| >
| > Thanks a loty in advance,
| >
| > Pieter
| >
|
|

Feb 27 '06 #7
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:uL**************@TK2MSFTNGP15.phx.gbl...
In Dutch Datum is only used as a singulair for Date. The pluriform of that
is official Data. Although most people use Datums now to make it not more
confusing as it already is.


Just one correction: In contrast to the people in the Netherlands, in
Belgium the people actually do know that they should use "data" as the
plural of "datum" which means "date" in english :-P
Feb 28 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gary Miller | last post by:
I have a DateTimePicker field and it is has a DataBinding to my dataset through the Text parameter. Why is it that if I do not choose a date that the information does not get propagated to the...
6
by: eye5600 | last post by:
Is there a cure for the problems using databinding with a DateTimePicker? I find that a) sometimes it works, sometimes it doesn't, and b) it fails silently causing all databinding on the DataSet...
3
by: Kevin Swanson | last post by:
I'm writing what should be a very simple app against an Oracle database. The app has a number of user controls, any one of which is loaded into a main display page using the loadControl method,...
3
by: John Bailey | last post by:
When I first built a few web pages in ASP .Net 2.0, I thought it was great. The formview and detailview contorls would automatically layout the controls for you, the update methods were...
0
by: Bernie Yaeger | last post by:
How can I use a datetimepicker as the control for entry of, say, enddate, when enddate may be any date but also may be null (because the end hasn't been reached yet)? Also, can I set up a...
8
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got...
11
by: =?Utf-8?B?R29rdWw=?= | last post by:
I am struck up with a problem and want anyone here to help me out. I am a beginner in .NET trying to learng DataBinding concepts. I have binded 4 text boxes with a dataset but when I say...
6
by: Kyote | last post by:
I'm using a DateTimePicker for date fields in an Access db Membership app. Some of the date fields are empty, meaning they haven't been filled out yet, or they cannot be. But when a record is read...
2
by: =?Utf-8?B?Y2xhcmE=?= | last post by:
Hi all, How control( or erase ) a datetimepicker's display and make it look like an ordinary combobox before clicking it? Clara -- thank you so much for your help
0
by: AboutJAV | last post by:
Hi, I am using a DateTimePicker control to allow the user to select a new date. At first, I use an event Date_Changed Event as well as databinding the control to a property. When the user click...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.