C# How to bind DataTable columns to DataGridView manually


dt = new DataTable();
dt.Columns.Add("Reference", typeof (string));
dt.Columns.Add("Version", typeof(string));
dt.Columns.Add("LatestVersion", typeof(string));
//5. Set AutogenerateColumns to false
dataGridView1.AutoGenerateColumns = false;
dataGridView1.DataSource = dt;


Popular posts from this blog

Parse XML to dynamic object in C#

Parse XML to object model in C# using XSD utility