By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,919 Members | 1,866 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,919 IT Pros & Developers. It's quick & easy.

DateTimePicker + DataBinding + Null-Value: THE solution?

P: n/a
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
Share this Question
Share on Google+
7 Replies


P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
"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 discussion thread is closed

Replies have been disabled for this discussion.