Public Class Form1
Private Sub ItemsBindingNavigatorSaveItem_Click(sender As Object, e As EventArgs) Handles ItemsBindingNavigatorSaveItem.Click
Me.Validate()
Me.ItemsBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.LolokikoDataSet)
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'LolokikoDataSet.Items' table. You can move, or remove it, as needed.
Me.ItemsTableAdapter.Fill(Me.LolokikoDataSet.Items)
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
ItemsBindingNavigatorSaveItem.PerformClick()
MsgBox("updated")
End Sub
End Class
我刚刚关注DataGrid
上的YouTube教程,我的保存按钮无效。