0% found this document useful (0 votes)
28 views

Table1Bindingsource - Moveprevious : Form1

This code defines the behavior of controls on a Windows form for viewing and editing data bound to a Table1BindingSource. Buttons move the cursor through records, add or remove records from the binding source, and save or cancel changes. The form loads data on initialization from a Table1 table into the binding source using a Table1TableAdapter.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Table1Bindingsource - Moveprevious : Form1

This code defines the behavior of controls on a Windows form for viewing and editing data bound to a Table1BindingSource. Buttons move the cursor through records, add or remove records from the binding source, and save or cancel changes. The form loads data on initialization from a Table1 table into the binding source using a Table1TableAdapter.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Public Class Form1

Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click

End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

Table1BindingSource.MovePrevious()
End Sub

Private Sub DataGridView1_CellContentClick(sender As Object, e As


DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick

End Sub

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load


'TODO: This line of code loads data into the 'Your_databaseDataSet.Table1' table.
You can move, or remove it, as needed.
Me.Table1TableAdapter.Fill(Me.Your_databaseDataSet.Table1)

End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click


Table1BindingSource.AddNew()
End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click


Table1BindingSource.MoveNext()
End Sub

Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click

Table1BindingSource.EndEdit()
End Sub

Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click


Table1BindingSource.RemoveCurrent()
End Sub

Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click


Me.Close()
End Sub
End Class

You might also like