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