Add a row to existing databound datagridview
<p>In my Windows application I had a job code combobox and when user selects a jobcode from the combobox it will get the corresponding data from database and will display it in a datagridview  below the combobox. All is fine and I am able to load data corresponding to selected jobcode.</p>

<p>I used the this code </p>

<pre><code>public void loadcompljobcodecombobox()
{
    completedcobcodeadapterTableAdapter cmpltjbcd = new completedcobcodeadapterTableAdapter();
    cmpltjbcd.Connection = new OleDbConnection(Program.ConnStr);

    DataTable dt= cmpltjbcd.GetData(int.Parse(cmbcutcode.SelectedValue.ToString()));

    if (dt.Rows.Count &gt; 0)
    {
       cmbjobcode.ValueMember = "jobpk";
       cmbjobcode.DisplayMember = "jobcode";

       txtcompanyname.Text = "companyname";
       cmbjobcode.DataSource = dt;
    }
    else 
    {
       MessageBox.Show("NO JobCode to be invoiced");
    }
}

private void cmbjobcode_SelectedValueChanged(object sender, EventArgs e)
{
    tbltoinvoicedtableTableAdapter tbltoinvce = new tbltoinvoicedtableTableAdapter();
    tbltoinvce.Connection = new OleDbConnection(Program.ConnStr);

    if (cmbjobcode.SelectedValue != null)
    {
       DataTable dt = tbltoinvce.GetDataBy(int.Parse(cmbjobcode.SelectedValue.ToString()));
       dataGridView1.DataSource = dt;
    }
}
</code></pre>

<p>Now my requirement is user must be able to select more than one jobcode details at a time for invoicing i.e. if he selects one value from jobcode corresponding data should be added in datagridview and when he select another jobcode its corresponding data should be added as next row in the Datagridview.</p>

<p>I had tried very much and find no way can anyone suggest an idea or example  </p>
