保存按钮不起作用

时间:2015-01-16 19:40:27

标签: vb.net datagrid

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教程,我的保存按钮无效。

0 个答案:

没有答案