473,385 Members | 1,888 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,385 software developers and data experts.

Binding checkboxes and date time picker [vb.net 2003]

Hi there

i'm trying to bind a checkbox and some date time picker fields to a dataset.

this is wat i have tried for the check box but it doesnt seen to work

chkObservation.DataBindings.Add("text", dsChildData,
"Child.ChildObservation")

SO how would i go about binding this?

Any suggestion would be helpfuly

thanks.
Mar 5 '06 #1
7 6736
Hardik,

Try the "Value" instead of the "text" in the datetimepicker. I thought that
it was "checked" in the checkbox. I am always confused by that one.

In the checkbox is the text the description. I assume that you want the
boolean value.

I hope this helps,

Cor
Mar 6 '06 #2
Hi,

When I take 'value' instead of 'text' (dtp1.DataBindings.Add("value", ds,
"ac_tran.tdate")) , following error occured.

Additional information: DataBinding could not find a row in the list that is
suitable for all bindings

Hardik Shah

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:uy*************@TK2MSFTNGP14.phx.gbl...
Hardik,

Try the "Value" instead of the "text" in the datetimepicker. I thought that it was "checked" in the checkbox. I am always confused by that one.

In the checkbox is the text the description. I assume that you want the
boolean value.

I hope this helps,

Cor

Mar 6 '06 #3
Hardik,

In this way (which is not the same as your original one), do you try to bind
a dataset.

There are more ways. However this way as you have it now will fail as well
with text.

When I take 'value' instead of 'text' (dtp1.DataBindings.Add("value", ds,
"ac_tran.tdate")) , following error occured.
(dtp1.DataBindings.Add("value", ds.Tables(0),"ac_tran.tdate"))
or something like that

Cor

Additional information: DataBinding could not find a row in the list that
is
suitable for all bindings

Hardik Shah

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:uy*************@TK2MSFTNGP14.phx.gbl...
Hardik,

Try the "Value" instead of the "text" in the datetimepicker. I thought

that
it was "checked" in the checkbox. I am always confused by that one.

In the checkbox is the text the description. I assume that you want the
boolean value.

I hope this helps,

Cor


Mar 6 '06 #4
Hi,

Thanks for your prompt reply.

Last Code used by me (dtp1.DataBindings.Add("value", ds, "ac_tran.tdate"))
for date time picker.

Hardik

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:#e**************@TK2MSFTNGP11.phx.gbl...
Hardik,

In this way (which is not the same as your original one), do you try to bind a dataset.

There are more ways. However this way as you have it now will fail as well
with text.

When I take 'value' instead of 'text' (dtp1.DataBindings.Add("value", ds, "ac_tran.tdate")) , following error occured.

(dtp1.DataBindings.Add("value", ds.Tables(0),"ac_tran.tdate"))
or something like that

Cor

Additional information: DataBinding could not find a row in the list that is
suitable for all bindings

Hardik Shah

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:uy*************@TK2MSFTNGP14.phx.gbl...
Hardik,

Try the "Value" instead of the "text" in the datetimepicker. I thought

that
it was "checked" in the checkbox. I am always confused by that one.

In the checkbox is the text the description. I assume that you want the
boolean value.

I hope this helps,

Cor



Mar 6 '06 #5
Hardik, is ds a datatable?

Cor
>

(dtp1.DataBindings.Add("value", ds.Tables(0),"ac_tran.tdate"))
or something like that

Cor

Mar 6 '06 #6
ds is a dataset

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:OC**************@TK2MSFTNGP15.phx.gbl...
Hardik, is ds a datatable?

Cor
>
(dtp1.DataBindings.Add("value", ds.Tables(0),"ac_tran.tdate"))
or something like that

Cor


Mar 6 '06 #7
>> Hardik, is ds a datatable?
Than why did you not follow my sample?

Cor
Cor
>> >
>> (dtp1.DataBindings.Add("value", ds.Tables(0),"ac_tran.tdate"))
>> or something like that
>>
>> Cor



Mar 6 '06 #8

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

Similar topics

5
by: Adrian Parker | last post by:
Hi. I have a date time picker in my program which uses ADO to read from an Access database. It works perfectly, unless the database is empty (no records) when opened. When you try to open an...
13
by: Deano | last post by:
Hi, I generate a report using two dates (From and To). I notice if I enter 01/10/2003 that it is interpreted by Access as 10/01/2003 i.e 10th January rather than 1st October as I intended. ...
2
by: Need Helps | last post by:
The example given in msdn.com on how to create a Date Time Picker involves using the CreateWindowEx function. However, I created a dialog box using the graphical interface, and then used the...
4
by: Rethish | last post by:
Hi All, I am developing an application in VB.net. I am using .Net Datetime picker control to manage the date. But I am not able to assign null/Empty value to the control. I found the property...
4
by: Michael Turner | last post by:
Hi Guys I have two DateTime pickers one shows the Date and the other the time, this is a requirement of the solution. The problem I have is that when the time is saved to the sql database into a...
5
by: Johnaton | last post by:
hi, I have this problem with the date time picker, when I bind the control to data table and add new record, it is ok, however, if I delete all records via a button using the...
2
by: Darhl Thomason | last post by:
I'm converting my Access 2003 VBA app. I have a number of date fields in my db that I want to use the date/time picker control with, but if there is no entry in my database, I want the date/time...
4
by: Michel Posseth [MCP] | last post by:
I have a problem with the date time picker validate event wich i believe is a bug How to reproduce : throw on a form a date time picker control and a textbox control select the validating...
0
by: fredloh | last post by:
i have a tab control on my form. i then have several microsoft date and time picker control on the tab control. when i select a date on any of the date and time picker control, the result of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.