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
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