BindingContext.AddNew method does not work if a DateTimePicker has been data bound

J

Joshua Ellul

Hi There,

When I databind a datetimepicker's value to that of a date field in a
database, the BindingContext's AddNew method does not work, if I remove this
binding it works fine.

Is this a bug or am I doing something wrong? This is the line that binds
the field:
dtpDOB.DataBindings.Add("value", myDS, "Persons.DOB")

Thanks,

Josh
 
J

Joshua Ellul

J

Joshua Ellul

Actually it didn't work,

Using BindingContext(Dataset, TableName) returns a BindingManagerBase so I
don't see a problem there.

:S

Thanks,

Josh
 
W

William Ryan

Josh, I may have given the wrong impression that the BMB doesn't have this
problem, if so, my apologies. I've worked with it but as you mention, your
code returns a BMB so that isn't the issue.
 
J

Joshua Ellul

Thanks, if I manage to solve the problem I'll let you know for future
reference,

Josh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top