Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
*I have data base that contain four tables (Product,ProductUnits,Invoice,InvoiceDetails) .
*Relations between tables as following
1- one-to-many (Product-ProductUnits)
2- one-to-many (Invoice-InvoiceDetails)
3- one-to-many (InvoiceDetails-Product)
4- one-to-many (InvoiceDetails-ProductUnits)
*This data base is mapped to entity model.
*Now InvoiceDetails table contain ProductID as foreign key and UnitID also as foreign key.
*I desigen Invoice form where InvoiceDetails is bound to data grid control ,product and units appear as drop down combo-box.
*All units appear when I drop down Units combobox.
*Question??
*I want units related to current product in InvoiceDetails entry only appear to user in combo-box.
*How can I bind InvoiceDetails.Units to current selected product in InvoiceDetails row.
Posted
Updated 22-Nov-14 11:12am
v2

1 solution

For that, you should bind the Units DropDown inside the SelectedIndexChanged Event of the Products DropDown.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900