version 1.0.2005.1 final (self-servicing)
VS2005 winforms
hiya,
I have a datagridview and a combobox which are on the same winform.
the combobox is outside the datagridView.
The datagridview displays all the products that are associated with a particular delivery.
The combobobox should display the correct van driver for the delivery.
my problem:
The datagridView dataSource does NOT contain the "driverId" field that I need. (this field is in another PARENT collection)
So, how can I set the correct van driver for the respective delivery?
TblDriverCollection.GetMulti(null);
cboDeliveryDrivers.DisplayMember = myProject.TblDriverFieldIndex.DriverName.ToString();
cboDeliveryDrivers.ValueMember = myProject.TblDriverFieldIndex.DriverId.ToString();
cboDeliveryDrivers.datasource = TblDriverCollection
tblDeliveryProdutsCollection1.GetMulti(null);
driverBindingSource.DataSource = tblDeliveryProdutsCollection1;
cboDeliveryDrivers.DataBindings.Add(new Binding("SelectedValue", this.driverBindingSource, TblDriverFieldIndex.DriverId.ToString(), true));
}
<schemas>
tblDeliveryProducts
deliveryId PK
productId PK
qty
tblDriver
driverId PK
driverName
tbldelivery
deliveryId PK
driverId ----THIS IS THE FIELD THAT I REQUIRE..BUT THIS FIELD IS NOT IN THE DATAGRIDVIEW.
</schemas>
I can clarify further and post more code, but i don't want to confuse the issue.
Can anyone help?
many thanks,
yogi