private void invoiceIDComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { ///Disable other drop down menu's if this is selected if (invoiceIDComboBox.IsEnabled) { invoiceDateComboBox.IsEnabled = false; invoiceAmountComboBox.IsEnabled = false; } ///The two other drop down menu's will be disbled when this is being used ///When selected this combo box will show a drop down list with invoice ID's ///The user will be able to highlight/select an ID and it will be recieved ///by the dataGrid1 to show that specific invoice only Console.Write("textbox Value: " + invoiceIDComboBox.SelectedItem); //get query needed find invoice String sQuery = mydb.SelectInvoiceID(invoiceIDComboBox.SelectedItem.ToString()); //datatable used to fget table data. dt = db.FillSqlDataTable(sQuery); //fill the datagrid invoiceGrid1.ItemsSource = dt.DefaultView; }