I may be going about this the wrong way...
I have a table with parts. A part has a field for active (bit). Parts are related to product lines with a cross reference table..
Currently I have a combo box with the product line and a listbox with the parts.
I am trying to only display the parts that are: a)related to the selected product line. b) active.
I've looked through the docs and others posts. I found a few related posts but I cant seem to get it right.
I've tried a few things similar to this In selectedIndexChanged event handler for the product line combo box:
listParts.DisplayMember = "PartNo";
IPredicateExpression aFilter = new PredicateExpression();
aFilter.Add(PredicateFactory.CompareValue(PartFieldIndex.IsActive, ComparisonOperator.Equal, true));
selectedProdLine.Part.GetMulti(aFilter);
listParts.DataSource = selectedProdLine.Part;
Am I on the right track? or do I have to create a new PartCollection. Setup the relationships and filter based on productline and a filter based on active? Is there anything wrong with doing this in the Index changed event handler for the combo box? Will my list change like I want it to?
what about selectedProdLine.GetMultiPart()....it doesnt seem to accept a filter?
btw: I am fairly new to .net. I am truly enjoying the product. I found it looking for some examples of complex datatable relation traversals (thank that random guy who lists your product in his blog). I have convinced the company to purchase and a I told a few friends about you guys. Thanks for the effort.