private void DashboardWindow_Load(object sender, EventArgs e) { //table.Columns.Add("Id", typeof(int)); table2.Columns.Add("First Name", typeof(string)); table2.Columns.Add("Last Name", typeof(string)); //table.Columns.Add("Score", typeof(double)); Console.WriteLine(currentUser.Stage.Id); IList <Participant> participants = ctrl.getParticipantsByScore(currentUser.Stage.Id); foreach (Participant participant in participants) { table2.Rows.Add(participant.FirstName, participant.LastName); } dataGridView2.DataSource = table2; table1.Columns.Add("Id", typeof(int)); table1.Columns.Add("First Name", typeof(string)); table1.Columns.Add("Last Name", typeof(string)); table1.Columns.Add("Score", typeof(double)); IList <ParticipantDTO> participantsDTO = ctrl.getParticipantsAndScore(); foreach (ParticipantDTO participant in participantsDTO) { table1.Rows.Add(participant.Id, participant.FirstName, participant.LastName, participant.Score); } dataGridView1.DataSource = table1; }