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

  • Thread starter Thread starter Hardik Shah
  • Start date Start date
H

Hardik Shah

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.
 
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
 
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
 
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
 
Hi,

Thanks for your prompt reply.

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

Hardik
 
Back
Top