as answered by JimJos
using (DataProvider errors = new DataProvider())
{
DataSet ds = errors.GetErrors(this);
DataTable dt = ds.Tables[0];
int i = dt.Columns.Count;
dt.Columns[18].SetOrdinal(0);
this.mainGridView.AutoGenerateColumns = false;
foreach (DataColumn col in dt.Columns)
{
BoundField field = new BoundField();
field.DataField = col.ColumnName;
field.HeaderText = col.ColumnName;
mainGridView.Columns.Add(field);
}
this.mainGridView.Columns[0].HeaderText = "Error";
this.mainGridView.Columns[1].HeaderText = "ReqID";
this.mainGridView.Columns[2].HeaderText = "SysID";
this.mainGridView.DataSource = dt;
this.mainGridView.DataBind();
}