Simple question about bound combobox at update

S

sandal

I'm new to vstudio and have the 2008 beta installed. From the data
source windows I dragged a detail form set of controls over to a form
and vs created the four fields for me complete with the navigation and
so forth. As long as I kept the fkey as an integer I could update. When
I removed that integer column and replaced with a combobox by dragging
from the toolbox (not the data sources window). I used the smart tag to
"Use data bound items" and the for data source used
tlkpItemTypeBindingSource, with sensible value and display members.

At runtime the combobox is populated; but when I try to update the
combobox, save the record, the change is not persisted. When I try to
create a new record, at save there is an error that the ItemTypeID field
is null (that's the field with combobox).

What am I missing?

Also, I don't understand what vs means by the (Data Bindings) property
listing. Most of the time if I expand that property Selected Item and
Selected Value are blank, even if the control does have values in the
data source, Display Member, and Value Member properties have values and
the control is functionally bound. So what does the (Data Bindings)
property point to?
 
S

sandal

Can someone please give me some input on this, it's really holding me
up, I've spent about 8 hours on this topic and have gotten nowhere. I
can't find a single example at least from MS that uses the "Use data
bound items" on a fkey combobox. The help files are completely useless.
 
S

sandal

The selected value is the value from the table being updated, that was
my error. Selected value is a poor naming choice by Microsoft but there
it is.

I still don't understand what the difference is as I wrote before

Is this a manifestation of simple binding and complex binding?
 

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