You can bind DataGridView directly to your cutomized table, after retrieving records from database through SqlDataReader instead of DataSet, as below:
DataTable tb2 = new DataTable("Table1");
tb2.Columns.Add("id", System.Type.GetType("System.String"));
tb2.Columns.Add("Dept", System.Type.GetType("System.String"));
cmd = new SqlCommand("Select DeptGroupID, DeptGroup from Department", conn);
SqlDataReader rdr;
conn.Open();
rdr = cmd.ExecuteReader();
while (rdr.Read())
{
DataRow newrow = tb2.NewRow();
newrow["id"] = rdr.GetInt32(0).ToString();
newrow["Dept"] = rdr.GetString(1);
tb2.Rows.Add(newrow);
}
conn.Close();
cmd.Dispose();
dataGridView2.DataSource = tb2.DefaultView;
Hope , it will be useful for you.