Q:

How to set headers for columns in DataGridView, where data is populated from a sql query

I have the following code working, I just want to display my own column names for each column rather than the ones in the database.
Is there any way I can do that?
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "total_registration";
cmd.Connection = con;
using (SqlDataAdapter a = new SqlDataAdapter(cmd.CommandText, con))
{        
    DataTable t = new DataTable();
    a.Fill(t);

    grid.DataSource = t;
}

A:

after binding datasource set column header text explicitly using the DataGridView.Columns[].HeaderText property:
grid.DataSource = t;
grid.Columns["ID"].HeaderText  = "Identifier";

