Passing id from one combobox to populate second combo box in WPF
问题 How do I pass the categoryId for the selected CategoryName in the first combo box, which would populate the products in the second combo box / the table structure is a below. Table_Category CategoryId CategoryyName Table_Product ProductId ProductName CategoryId ProductPrice ProductUnit Thanks, Hussain Patel 回答1: for the first combo box (cmbcategory) using ADO.NET (code), get category object (containing the categoryId and categoryName) and bind to itemsource property of first combo box