You can use column aliases to name the columns that you fetch from the database. Using column aliases, you can link the alias name with the column of the DataGridView control.
First, you'll have to fetch the data with column aliases from the database and store it in a DataTable. You can use the following code for that:
SqlConnection cn = new SqlConnection (...);
string sql = "Select p.no as 'Num', p.Name as 'Name', q.city as 'City', q.Phone as 'Phone' from tab1 p, tab2 q; where p.no = q.no";
SqlCommand sCmd = new SqlCommand(sql,cn);
SqlDataAdapter sAdap = new SqlDataAdapter(sCmd);
DataSet ds = new DataSet();
sAdap.Fill(ds);
DataTable dt = ds.Tables[0];
Now create your DataGridview. Choose Edit Columns (in the Component menu) and add four columns. You can name the columns or provide headers based on your wish. For the DataProperty Value of each of the columns provide values as Num, Name, City and Phone for the columns respectively.
Now set the DataSource of the DataGridView to the Datatable. (Refer the code below).
this.DataGridView1.DataSource = dt;
That should do it!
~ Cheers