you're right Jim,
You see, I wanted to create a "read only" combobox.
I was trying to take a shortcut by simply:
1) binding the combobox to a typedList
2) "forcing" a selection in the combobox, by setting the selectedValue.
Obviously, that isn't working.So, it's down the databindings collection route I will go.
Forget about "runs", the easiest way for me to explain is by talking about delivery drivers.
I have a winform that displays all the products in a delivery in a datagridView
Above this datagridview there are a few comboxes...one of which represents the particular a list of delivery drivers.
Obviously, each delivery has a specific driver.
So, I know that I should ditch the tyedLists, in favour of the databindings collection.
tblDeliveryCollection1.GetMulti(null);
driverBindingSource.DataSource = tblDeliveryCollection1;
cboDrivers.DataBindings.Clear();
cboDrivers.DataSource = driverBindingSource;
cboDrivers.DisplayMember = dalProject.TblDriverFieldIndex.DriverName.ToString();
cboDrivers.ValueMember = dalProject.TblDriverFieldIndex.DriverId.ToString();
cboDrivers.DataBindings.Add(new Binding("SelectedValue", this.driverBindingSource, TblDriverFieldIndex.DriverId.ToString(), true));
hmm, I think that this is nearly right..but at the moment, cboDriver displays several drivers MULTIPLE times.
have I made an easy mistake?
many thanks,
yogi