BindingNavigator Delete problem

jindalee used Ask the Experts™
I am using the attached snippet to intercept the Delete button on a binding navigator being clicked to confirm a record deletion.

When I click the button, the dialog is displayed. If I hit 'Yes' the record appears to be deleted, i.e. the record counter shows (e.g.) 1 of 5 where it used to show 1 of 6.

If I re-run the program the record counter shows 1 of 6 and the record I thought I had deleted is still present.

Can someone pelase advise what I am missing?
Private Sub BindingNavigatorDeleteItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorDeleteItem.Click
	If MessageBox.Show("Are you sure?", "", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then
	End If
End Sub

Open in new window

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
The RemoveCurrent only marks the currect record as deleted. It does not remove it completely, so unless you update back to the original dataset (using the DataAdaptre.Update command, for example), any changes you make will not persist.



Thatnk you.

I added the line TblClassificationsTableAdapter.Update(FilingRegisterDataSet) which now removes the record

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial