Like Adolfo, I confirmed that it works. There is nothing wrong with the code shown, so the problem should be in code that you are not showing.
My guess: Age , etc. are not publicly available; either they are internal , or they are fields, i.e. public int Age; instead of public int Age {get;set;} .
Here, your code works for both a well-typed array and an array of anonymous types:
using System; using System.Linq; using System.Windows.Forms; public class Student { public int Age { get; set; } public double GPA { get; set; } public string Name { get; set; } } internal class Program { [STAThread] public static void Main() { Application.EnableVisualStyles(); using(var grid = new DataGridView { Dock = DockStyle.Fill}) using(var form = new Form { Controls = {grid}}) {
source share