private void dgPersons_CellEditEnding(object sender, DataGridCellEditEndingEventArgs e) { if (e.Column.DisplayIndex == 1) //Name Column { string Name = ((TextBox)e.EditingElement).Text.ToLower(); var dict = App.Dict.Where(p=> p.Name.ToLower() == name.ToLower()).ToList(); if (dict.Count > 0) dgPersons.SelectedItem = dict[0]; else { MessageBox.Show("Cannot find Event: " + name, "Not Found"); e.Cancel = true; ((TextBox)e.EditingElement).Text = ""; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)