public GroupTraineesByTester() { InitializeComponent(); bl = BL.FactoryBL.GetBL(); foreach (BE.Trainee item in bl.getTraineeList()) { (item.NameOfTeacher) = bl.getTraineeTeacher(item.NameOfTeacher); } this.dataGrid.ItemsSource = bl.getTraineeList(); ListCollectionView collection = new ListCollectionView(bl.getTraineeList()); collection.GroupDescriptions.Add(new PropertyGroupDescription("NameOfTeacher")); dataGrid.ItemsSource = collection; }