在使用datagridview几天之后,也许几个星期我开始真正自己和这里的人们学习,我感谢你们所有人,但同时我也开始感到困惑。我的问题是,除了此代码之外,还有其他方法可以在MySQL Database
更新CellEndEdit
吗?
Me.Validate()
Me.OutgoingdeliveriesBindingSource.EndEdit()
Me.OutgoingdeliveriesTableAdapter.Update(Me.OutgoingDeliveriesDataSet1.outgoingdeliveries)
非常感谢任何建议或提示。
答案 0 :(得分:0)
下面是我使用的一个可以修改为在您的实例中使用的。这实际上似乎在我使用它时工作得相当好。
Private Sub FinancialBindingNavigatorSaveItem_Click(sender As System.Object, e As System.EventArgs) Handles FinancialBindingNavigatorSaveItem.Click
FinancialDataGridView.CommitEdit(DataGridViewDataErrorContexts.CurrentCellChange)
db.SaveChanges()
End Sub