I have a gridview that uses outside controls to insert/update/delete rows.
I fill it with a tableadapter.
I insert/update/delete using custom calls. The following works fine -- it inserts fine and grid refreshes with inserted record -- but when I close the child form in which it is called, and then reopen the child form, the grid is missing the new record.
The same thing with the update and delete. It is like the tableadapter isn't refreshing with the new data.
I am using a SQLCE db, and that db is in my bin folder.
Any ideas on how I can refresh the tableadapter so that the grid always reflects exactly what is in the db?
Thanks
Chad
I fill it with a tableadapter.
private void ManageLocations_Load(object sender, EventArgs e) |
{ |
this.wISE_LocationsTableAdapter.Fill(this.locations.WISE_Locations); |
} |
I insert/update/delete using custom calls. The following works fine -- it inserts fine and grid refreshes with inserted record -- but when I close the child form in which it is called, and then reopen the child form, the grid is missing the new record.
private void InsertLoc() |
{ |
sh.InsertLoc(txtName.Text, txtZip.Text, string.Empty, string.Empty); |
this.rgLocations.Rows.Add(txtName.Text, txtZip.Text); |
this.UpdatePanelInfo(this.rgLocations.CurrentRow); |
} |
The same thing with the update and delete. It is like the tableadapter isn't refreshing with the new data.
I am using a SQLCE db, and that db is in my bin folder.
Any ideas on how I can refresh the tableadapter so that the grid always reflects exactly what is in the db?
Thanks
Chad