hiya,
I read the help.
I am doing the databinding at runtime, in code.
The only design-time stuff I have are the blank bindingSources that I dragged onto my form.
I set all the values for these bindingSources in code.
This is my code..Is there maybe something else that i should be aware of?
Cheers,
yogi
//predicate code.
IPredicateExpression filtReturnProductCondition = new PredicateExpression();
filtReturnProductCondition.Add(PredicateFactory.CompareValue(TblReturnProductsFieldIndex.ReturnProductCondtionId, ComparisonOperator.Equal, (int)cboReturnProductCondition.SelectedValue)); //
filtReturnProductCondition.Add(PredicateFactory.CompareValue(TblReturnProductsFieldIndex.ReturnId, ComparisonOperator.Equal, _selectedReturnId));
//databindingCode
tblReturnProductsCollection1.GetMulti(filtReturnProductCondition);
childBindingSource.DataSource = tblReturnProductsCollection1;
dgvReturns.DataSource = childBindingSource;
TblReturnProductConditionCollection returnProductConditionCollection = new TblReturnProductConditionCollection();
returnProductConditionCollection.GetMulti(null);
cboReturnProductCondition.DataSource = returnProductConditionCollection;
cboReturnProductCondition.ValueMember = "returnProductCondtionId";
cboReturnProductCondition.DisplayMember = "returnProductCondtionName";
cboReturnProductCondition.DataBindings.Clear();
cboReturnProductCondition.DataBindings.Add(new Binding("SelectedValue", this.childBindingSource, myProject.TblReturnProductsFieldIndex.ReturnProductCondtionId.ToString(), true));
the cboReturnProductCondition_SelectIndexChanged event handler calls the above code.