title: How to add a custom column
body: <p>i want to display two columns in datagrid view .
  first by sql-table
  second is unbounded where i want some selection button which tells which row in selected.</p>
  
  <p>i get   the first column from table but i am not able to figure it out how to add second column.Following is my code.</p>
  
  
  
  <pre class="lang-cs prettyprint-override"><code>namespace WindowsFormsApplication14
  {
      public partial class Form1 : Form
      {
          public Form1()
          {
              InitializeComponent();
          }
  
          private void Form1_Load(object sender, EventArgs e)
          {
              string constring = @"server=.\SQLSER;database=test1;integrated security=true;";
              string sql = @"select rel.depar from rel RIGHT OUTER JOIN cust on cust.id=rel.id";
              SqlConnection con = new SqlConnection(constring);
              con.Open();
              SqlCommand cmd = new SqlCommand(sql,con);
              SqlDataReader red = cmd.ExecuteReader();
  
              dataGridView1.ColumnCount = 2;
              dataGridView1.Columns[0].Name = "department";
              dataGridView1.Columns[1].Name = "unboundcolumn";
  
              while (red.Read())
              {
                  dataGridView1.Rows.Add(red["depar"]);                            
              }
  
              red.Close();
              con.Close();
          }
      }
  }
  </code></pre>