473,545 Members | 2,115 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2571
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**********@h otmail.com> schreef in bericht
news:%2******** *******@TK2MSFT NGP12.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**********@h otmail.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_DateTi mePicker.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******** **********@TK2M SFTNGP12.phx.gb l...
| 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**********@h otmail.com> schreef in bericht
| news:%2******** *******@TK2MSFT NGP12.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******** ******@tk2msftn gp13.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******** **********@TK2M SFTNGP12.phx.gb l...
| 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**********@h otmail.com> schreef in bericht
| news:%2******** *******@TK2MSFT NGP12.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******** ******@tk2msftn gp13.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******** **********@TK2M SFTNGP12.phx.gb l...
| 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**********@h otmail.com> schreef in bericht
| news:%2******** *******@TK2MSFT NGP12.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******** ******@TK2MSFTN GP15.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
301
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 database? The field comes up with today's date in it and I do not fell it necessary to choose a date if today's date is OK. What am I doing...
6
6721
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 to fail with a error message. Help!
3
3139
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, depending on which menu item a user selects. Each of these controls follows the same basic pattern: Get a dataset from the database and then display...
3
1846
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 automatically generated, and the objectdatasource let you design against a business object through the gui. Now I am working on my first real web application...
0
1265
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 datetimepicker that will allow manual entry instead of a pick from the calendar, such that the user can simply enter '09/23/2004'? Thanks for any help. ...
8
2170
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 answered... In 1.1 we always did our own myDataAdapter.fills and we liked that control for lots of good reasons. Now the new DataSource (or is it a...
11
1783
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 adapter.update it gives me 0 records updated! I am not getting any exceptions. Below is the complete code. Someone please help me out. using System; using...
6
2548
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 with empty fields, their connected DateTimePicker's display the current date. Is there any way to have the DateTimePicker show as empty/blank?...
2
1714
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
1299
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 on the control and the calender drops down, the new selected date will invoke either the databinding or event handler method, which trigger another...
0
7468
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7808
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7423
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7757
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5329
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3450
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1884
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
704
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.