Bound DateTimePickers don't display with currency managers

G

Guest

I put in the question below several days ago without an answer. However, there really was a problem. I finally figured it out. It seems whenever I create a bound form with a currency manager that includes DateTimePicker(s) for Date Fields, the values in the controls don't show. As soon as I remove the DTP(s) and put in default values in the underlying ms Access database for the date fields, the currency managers work and the remaining controls (textboxes and a checkbox) contain values. Furthermore, whereas the add button and submit changes butto produced errors before, without the bound DTP(s) these buttons worked fine.

Am I doing something wrong, is there a bug, or do DTP(s) need to be bound by something other by currency managers?

The only way I see around this is by unbound DTP(s) whose changed values are shifte to the text properties of bound textboxes. This is unwieldy. Is there a better way>

polynomial5d

Here is my original posting below:




Subject: bound form won't display fields 2/11/2004 4:39 AM PST

By: polynomial5d (search by author) In: microsoft.public.dotnet.framework.adonet

A form with bound controls(using a currency manager) opens without showing the data. I fill the dataset in the form_load procedure.

cm = CType(BindingContext(DsPermissions1, "Permissions"), CurrencyManager)
AddHandler cm.ItemChanged, AddressOf cm_ItemChanged
AddHandler cm.PositionChanged, AddressOf cm_PositionChanged


Try
daPermis.Fill(DsPermissions1.Permissions)

Intellisense tells me I'm using the right objects and members. Databinding properties proceed well. I've produced many such forms and they've all worked until this one.

After the form opens if I click movenext I get the following error message:

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


cm.Position += 1 this line is yellowed.

If I click addnew I get the same error message with

cm.AddNew with this line yellowed.

polynomial5d
 
G

Guest

I found an answer. If I bind the datetimepickers to the text property rather than the value property the values show. This must be a known issue, yet nobody answered me. I'm disappointed in that, especially since I'm a universal subscriber and am due an answer from Microsoft related people

polynomial5d
 
D

D Talbot

Thanks for that. I had a similar problem where the first click on my
'Apply Changes' button wasn't firing if a control with unsaved edits
still had focus.

Changing to the text property fixed it :)

DAz
 

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