Programmatically setting a datagridview cell value, but dataAdapter.Update() does not update the DB
<p>I am programmatically updating a certain cell in a DGV and when I call my UpdateDGV(), it does not update to the DB. However, if I manually update that cell, which is a combo box and bound(DB using a DataTable), and fire off my update function, it works fine. It almost seems that a specific property for the combo box has not been set to modified or something similar to that. See code below:</p>

<pre><code>private void CheckForPendingStatus()
{
    foreach (DataGridViewRow row in datagriview1.Rows)
        {
            if (row.Cells["status_cd"].Value.ToString().Equals(Constants.pending_status))// 'P'
            {
                row.Selected = true;
                row.Cells["status_cd"].Value = "I";
                UpdateDGV();
                break;
            }
        }
}
private void UpdateDgv()
    {
        try
        {
            // Update the database with the user's changes.
            dataAdapter.Update((DataTable)BindingSource1.DataSource);
        }
        catch (System.ArgumentNullException ArgNullExc)
        {
            MessageBox.Show("UpdateDgv - ArgumentNullException: error message: " + ArgNullExc.Message);
        }
        catch (System.InvalidOperationException InvalidOperExc)
        {
            MessageBox.Show("UpdateDgv - InvalidOperationException: error message: " + InvalidOperExc.Message);
        }
        catch (System.SystemException SysExc)
        {
            MessageBox.Show("UpdateDgv - SystemException: error message: " + SysExc.Message);
        }
        catch (Exception ex)
        {
            MessageBox.Show("UpdateDgv - Exception: error message: " + ex.Message);
        }
    }
</code></pre>

<p>I've tried to see if there are any changes using the code below:</p>

<pre><code>DataTable changes = ((DataTable)BindingSource1.DataSource).GetChanges();

if (changes != null)
    {
        //Update....
    }
</code></pre>

<p>As noted above, when programmatically making the change, 'changes' is null but not null when you physically click on the combo box and change the value.</p>

<p>Would I need to also set the value member and display member in the combo box for that cell? Will try to figure it out and see.</p>

<p>Any help is much appreciated, thank you.</p>