private void PerList_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (perList.SelectedCells.Count > 0) { var cellInfo = perList.SelectedCells[0]; var selectedEmp = (EMP_LIST)(cellInfo.Column.GetCellContent(cellInfo.Item).DataContext); if (selectedEmp.ID > 0) { HRCard hc = new HRCard(); hc.personID = selectedEmp.ID.ToString(); hc.ShowDialog(); } } }