1 Previous Next 

DataGridView: Binding Navigator Confim Delete


In the designer set the bindingnavigators deleteitem to none. The delete button should still be there. Add the following code to the Bindingnavigators delete item click event. Untitled 9
    Private Sub BindingNavigatorDeleteItem_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgsHandles BindingNavigatorDeleteItem.Click
        If MessageBox.Show _
            ("Are you sure?"""MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then
            ContactBindingSource.RemoveCurrent()
        End If
    End Sub



1 Previous Next