I followed some examples I found but the line that does the sorting doesn't work. Below is the code example:
List<GridData> data = new List<GridData>() {
new GridData { name="test1", address="a", id=1, phone=1 },
new GridData { name="test6", address="f", id=3, phone=6 },
new GridData { name="test10", address="c", id=6, phone=8 },
new GridData { name="test8", address="z", id=8, phone=10 },
new GridData { name="test0", address="o", id=10, phone=12 }
};
dataGridView1.DataSource = data;
dataGridView1.Sort(dataGridView1.Columns[0], ListSortDirection.Ascending);