BindingNavigatorDeleteItem problem RRS feed

  • Question

  • BindingNavigatorDeleteItem problem

    I have a windows form in which is shown a single row from the concepts table

        Private Sub frmEC_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            'TODO: This line of code loads data into the 'DsHasbara.Concepts' table. You can move, or remove it, as needed.
            Me.ConceptsTableAdapter.FillByID(Me.DsHasbara.Concepts, ECID)
        End Sub
    where ECID is set by the calling form

    I have the entire binding navigator on the form.

    What I want is when I click the     BindingNavigatorDeleteItem handler, that the form automatically update the database and close the form, rather than also having to click the save button on the bindinging navigator.

    I tried this
        Private Sub BindingNavigatorDeleteItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorDeleteItem.Click

        End Sub
    without the commenting out of course.

    The form closes all right, but the item remains in the calling form's list box.  If I click the delete first and then the save second, the item in the calling form's listbox is deleted.

    Can somebody tell me why?

    Monday, March 13, 2006 6:47 AM