private void DataGridSearchCellEditEnding(object sender, DataGridCellEditEndingEventArgs e) { var textBox = e.EditingElement as TextBox; if (textBox != null && prevVal != textBox.Text.ToUpper()) { var text = textBox.Text.ToUpper(); if (BJGViewModel.BatchJobGroups.Any(item => item.Name == text)) { ResetGrid(); Error?.Invoke("Duplicate entry deleted.", null); } else if (text == "") { ResetGrid(); Error?.Invoke("Empty values are not allowed.", null); } } if (Keyboard.IsKeyDown(Key.RightCtrl) && Keyboard.IsKeyDown(Key.Enter)) { BJGViewModel.GetFomDatabase(); } }
private void ButtonLoadClick(object sender, RoutedEventArgs e) { BJGViewModel.GetFomDatabase(); }