private void OnDetailCommand(DataGrid currentDataGrid) { try { GetAcademicByID_Result data = (GetAcademicByID_Result)currentDataGrid.SelectedItem; selectedSubjectID = data.DisciplineID; SubjectDetail = new ObservableCollection <GetDetailDisciplineByID_Result>(ST.GetDetailDisciplineByID(selectedSubjectID).ToList()); } catch { return; } }