BindingSource C#

Setup:
I have a DataGridView with a bindingsource set to a dataset.
Text boxes, combo boxes, etc are binded to the bindingsource.
If the user click on the datagridview row, the bindingsource populates the textboxes, etc.
Issue:
When the user changes the selectedvalue on a specific combobox and it equals 16, then I need to add a new row to my dataset/bindingsource.
I have a new row added to the dataset, shows in the datagridview, and count is updated in the bindingsource, but when I click to go through the rows in the bindingnavigator, when it gets to the new row, it stops.  Sort of like it doesn't have information to load it.

Here's my code:
 private void SaleTypecomboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
           
            if (SaleTypecomboBox.SelectedValue.ToString().Equals("16"))
            {
                DataRowView currentRow = (DataRowView)bindingSource1.Current;
                DataRow dr = dtRunsheet.NewRow();

                dr["acct_AccountingRunsheetID"] = -1;
                dr["acct_SittingID"] = (int)currentRow.Row["acct_SittingID"];
                dr["acct_BookingID"] = _bookingID;
                dr["acct_ChildFirstName"] = currentRow.Row["acct_ChildFirstName"].ToString();
                dr["acct_ParentFirstName"] = currentRow.Row["acct_ParentFirstName"].ToString();
                dr["acct_ParentLastName"] = currentRow.Row["acct_ParentLastName"].ToString();
                dtRunsheet.Rows.Add(dr);
               
                bindingSource1.ResetBindings(false);

                bindingSource1.DataSource = dtRunsheet;
                bindingSource1.Sort = "acct_SittingID";
               
           }
        }

Does anyone know what I'm leaving out?
Thanks,
Faith
NWSITSupportAsked:
Who is Participating?
 
NWSITSupportAuthor Commented:
Sounds sort of like what I need, but can you provide some sample code?
0
 
NWSITSupportAuthor Commented:
Needed some code example to help, but the link that was provided allowed me to move in the right direction.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.