All,
Preface: I really appreciate the help. I know questions similar have been asked many times because I've seen them in these forums and all over Google. No solution works.
Problem: When adding entries (rows) to a database, the DataGridView that is bound to the dataset connected to that database does not refresh.
Description: I essentially have bound my DataGridView to an MS Access file containing the table personnel. When I use the provided adapter to insert a row in the database, no matter what I do, the DataGridView does not refresh. As you can see in the compiling code below, I have tried several things.
Code:
Form1::PersonnelTableAdapter->Insert(theSSN, theLast, theFirst, theHourly, theHours); //this line does add an entry to the MS Access database
Form1::datasetPersonnel->Tables[0]->BeginLoadData();
System::Data::DataTableReader ^ refreshReader = Form1::datasetPersonnel->Tables[0]->CreateDataReader();
Form1::datasetPersonnel->Tables[0]->Load(refreshReader);
Form1::dataGridViewPersonnel->EndEdit();
Form1::dataGridViewPersonnel->Refresh();
Form1::dataGridViewPersonnel->Parent->Refresh();
Form1::datasetPersonnel->GetChanges();
Form1::personnelBindingSource->ResetBindings(
true);
Form1::dataGridViewPersonnel->Refresh();
Thanks - I've tried everything I can find and nothing works,
Ryan