public static Control showStudents() { List <SomerenModel.Student> sl = new List <SomerenModel.Student>(); //SomerenDB. SomerenDB db = new SomerenDB(); sl = db.DB_getstudents(); SomerenModel.Student[] studenten = sl.ToArray(); ListView c = new ListView(); c.View = View.Details; c.BackColor = System.Drawing.SystemColors.ControlLight; c.Columns.Add("Student ID ", -2, HorizontalAlignment.Left); c.Columns.Add("Voornaam ", -2, HorizontalAlignment.Left); c.Columns.Add("Achternaam ", -2, HorizontalAlignment.Left); c.Height = 1000; c.Width = 1000; for (int i = 0; i < studenten.Length; i++) { ListViewItem lv = new ListViewItem(studenten[i].getId().ToString()); lv.SubItems.Add(studenten[i].getNaam()); lv.SubItems.Add(studenten[i].getAchternaam()); c.Items.Add(lv); } return(c); }