version 1.0.2005.1 final (self-servicing)
VS2005 winforms
hiya,
I have a combobox that contains a databindings that links to a child entityCollection (via a bindingSource)
This bindingSource is also bound to a datagridView.
The combobox represents the "condition" that a product is in, eg, NEW or OLD
//Combobox is initially populated. (when winform is loaded)
TblReturnProductConditionCollection returnProductConditionCollection = new TblReturnProductConditionCollection();
returnProductConditionCollection.GetMulti(null);
cboReturnProductCondition.DataSource = returnProductConditionCollection;
//databindings are created whenever the "childBindingSource" changes
cboReturnProductCondition.DataBindings.Clear();
cboReturnProductCondition.DataBindings.Add(new Binding("SelectedValue", this.childBindingSource, myProject.TblReturnProductsFieldIndex.ReturnProductCondtionId.ToString(), true));
My problem:
Whenever is I select an option, If the filtered "childBindingSource" (which will poulate the datagridView) contains more than a SINGLE product with the SAME product condition, then I get the error:
<<operation is not valid, due to the current state of the object>>
I suspect that the databindings is becoming confused because there could be MULTIPLE products in the datasource that contain the same productConditionId
eg, the datagridView:
productId 1 productCondition NEW
productId 2 productCondition NEW
I hope the above makes sense.
Please let me know if I should post more code / clarify.
I'm in a wee bit of a hurry with this one :-0
cheers,
yogi