private void productSelectComboBox_SelectedIndexChanged(object sender, System.EventArgs e) { // get the selected product if (productSelectComboBox.SelectedItem == null) { return; } var selectedProduct = (ProductEntity)productSelectComboBox.SelectedItem; IEntityCollection2 customers = _dalService.GetAllCustomersFilteredOnProduct(selectedProduct.ProductId); customers.AllowNew = false; // bind them customersDataGrid.DataSource = customers; _amountUnitsSoldTextBox.Text = _dalService.GetNumerOfTimesProductWasSold(selectedProduct.ProductId).ToString(); }