private void SetFilter_Click(object sender, RoutedEventArgs e) { operand = Operand.SelectedItem?.ToString(); ColumnToFilterOn = FilterList.SelectedItem?.ToString(); if (ColumnToFilterOn == null) { System.Windows.MessageBox.Show("Invalid data - Please select the field you wish to filter on ?"); FilterList.Focus(); return; } if (FilterValue.Text == "") { System.Windows.MessageBox.Show("Invalid data - Please enter the Search Term to be used for filtering on ?"); FilterValue.Focus(); return; } FilterResult = true; Close(); }