Private Sub CustomersDataGridView_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles CustomersDataGridView.DoubleClick Dim row As NorthwindDataSet.CustomersRow row = CType(CType(Me.CustomersBindingSource.Current, DataRowView).Row, NorthwindDataSet.CustomersRow) My.Forms.CustomersForm.Show(row.CustomerID) ' Me.Validate() Me.CustomersBindingSource.EndEdit() Me.CustomersTableAdapter.Update(Me.NorthwindDataSet.Customers) End Sub |