Part 3- Binding Navigator in
Form design vb.net
Dr. Girija Narasimhan 1
Watch this tutorial in the youtube link :
https://www.youtube.com/watch?v=_U8TMuhQ1JU
Suppose in the form design , Binding Navigator is not appear then go to view
tool box  data Binding Navigator drag and place it in form design
Dr. Girija Narasimhan 2
In the Form Design  Binding Navigator right click Property  Binding source  change
appropriate table binding source, then only in the runtime it is active otherwise it is inactive
in runtime. Only visible in design time
Dr. Girija Narasimhan 3
Dr. Girija Narasimhan 4
Part 5- QUERY
BUILDER IN VB.NET
Dr. Girija Narasimhan 5
Part 6- FILTER USING
TABLE RECORD
IN
VB.NET
Dr. Girija Narasimhan 6
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
StudentDataGridView.Visible = True
StudentBindingSource.Filter = "internal > ' " & 30 & " ' "
End Sub
Search button
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
StudentDataGridView.Visible = True
StudentBindingSource.Filter = "sId = ' " & TextBox1.Text & " ' "
End Sub
Filter Button
Dr. Girija Narasimhan 7
Part 7- NAVIGATING
THROUGH RECORD SET
IN
VB.NET
Dr. Girija Narasimhan 8
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
StudentBindingSource.MoveFirst()
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
StudentBindingSource.MoveNext()
End Sub
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
StudentBindingSource.MoveLast()
End Sub
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
StudentBindingSource.MovePrevious()
End Sub
Dr. Girija Narasimhan 9
Part 8- Add/update/delete
records using records
operation buttons
IN
VB.NET
Dr. Girija Narasimhan 10
ADDNEW Buttton
Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
StudentBindingSource.AddNew()
End Sub
UPDATE Button
Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
Dim ANS As String
ANS = InputBox("Sure to save changes done?")
If ANS = "y" Or ANS = "Y" Then
Me.Validate()
Me.StudentBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.Part3DataSet)
End If
End Sub
Dr. Girija Narasimhan 11
Private Sub StudentDataGridView_RowLeave(sender As Object, e As
DataGridViewCellEventArgs) Handles StudentDataGridView.RowLeave
Me.Validate()
‘ Me.StudentBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.Part3DataSet)
End Sub
Delete Button
Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
Dim ANS As String
ANS = InputBox("Sure to delete current record?")
If ANS = "y" Or ANS = "Y" Then
Me.Validate()
Me.StudentBindingSource.RemoveCurrent()
Me.TableAdapterManager.UpdateAll(Me.Part3DataSet)
MessageBox.Show("Record delete sucessfully")
End If
End Sub
ADDNEW not save the new record information in the table so, this coding is needed
Dr. Girija Narasimhan 12
Part 9- Report using VB.NET
Step 1: create two forms as form1 and form2 and create database, databaset and one
table name as “student”
Step 2: In the form1  Project  add new item  report change name of the report
(for example “student.rdlc”)
Step 3: Now in the form1 report information appear right click the report
information  Insert  page header
Step 4viewtool box drag Text box and place ittype “Student
information”right click text box properties  change font, color, size, font style
Step 5: toolbox  text box (in the page header) place the mouse in the middle of the
text box and right click it  expression built-in-function page number double click
Step 6: in the page footer toolbox text box place the mouse in the middle of the
text box and right click it  expression common function  date or time
Step 7 : toolbox table control  name of the dataset1 (by default) data source
change it as (solution explorer .xsd name)  table name
13
SUMMARY FOR PREPARING REPORT
Step 8: the above design will appear- right click the “Database symbol”
Step 9: insert one-by-one all the column in the table
Suppose required extra column then Right click the column top  then insert column 
right or left
14
Step 10 new form2  toolbox  report  report viewer drag and place it  right
the arrow mark in the report control –choose report select your report (bonding
report)
Step 11: solution explorer  vb project  properties startup form 
form2 run the form
15
Dr. Girija Narasimhan 16
Dr. Girija Narasimhan 17
Dr. Girija Narasimhan 18
Dr. Girija Narasimhan 19
Dr. Girija Narasimhan 20

Part 3 binding navigator vb.net

  • 1.
    Part 3- BindingNavigator in Form design vb.net Dr. Girija Narasimhan 1 Watch this tutorial in the youtube link : https://www.youtube.com/watch?v=_U8TMuhQ1JU
  • 2.
    Suppose in theform design , Binding Navigator is not appear then go to view tool box  data Binding Navigator drag and place it in form design Dr. Girija Narasimhan 2
  • 3.
    In the FormDesign  Binding Navigator right click Property  Binding source  change appropriate table binding source, then only in the runtime it is active otherwise it is inactive in runtime. Only visible in design time Dr. Girija Narasimhan 3
  • 4.
    Dr. Girija Narasimhan4 Part 5- QUERY BUILDER IN VB.NET
  • 5.
    Dr. Girija Narasimhan5 Part 6- FILTER USING TABLE RECORD IN VB.NET
  • 6.
    Dr. Girija Narasimhan6 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click StudentDataGridView.Visible = True StudentBindingSource.Filter = "internal > ' " & 30 & " ' " End Sub Search button Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click StudentDataGridView.Visible = True StudentBindingSource.Filter = "sId = ' " & TextBox1.Text & " ' " End Sub Filter Button
  • 7.
    Dr. Girija Narasimhan7 Part 7- NAVIGATING THROUGH RECORD SET IN VB.NET
  • 8.
    Dr. Girija Narasimhan8 Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click StudentBindingSource.MoveFirst() End Sub Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click StudentBindingSource.MoveNext() End Sub Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click StudentBindingSource.MoveLast() End Sub Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click StudentBindingSource.MovePrevious() End Sub
  • 9.
    Dr. Girija Narasimhan9 Part 8- Add/update/delete records using records operation buttons IN VB.NET
  • 10.
    Dr. Girija Narasimhan10 ADDNEW Buttton Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click StudentBindingSource.AddNew() End Sub UPDATE Button Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click Dim ANS As String ANS = InputBox("Sure to save changes done?") If ANS = "y" Or ANS = "Y" Then Me.Validate() Me.StudentBindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me.Part3DataSet) End If End Sub
  • 11.
    Dr. Girija Narasimhan11 Private Sub StudentDataGridView_RowLeave(sender As Object, e As DataGridViewCellEventArgs) Handles StudentDataGridView.RowLeave Me.Validate() ‘ Me.StudentBindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me.Part3DataSet) End Sub Delete Button Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click Dim ANS As String ANS = InputBox("Sure to delete current record?") If ANS = "y" Or ANS = "Y" Then Me.Validate() Me.StudentBindingSource.RemoveCurrent() Me.TableAdapterManager.UpdateAll(Me.Part3DataSet) MessageBox.Show("Record delete sucessfully") End If End Sub ADDNEW not save the new record information in the table so, this coding is needed
  • 12.
    Dr. Girija Narasimhan12 Part 9- Report using VB.NET
  • 13.
    Step 1: createtwo forms as form1 and form2 and create database, databaset and one table name as “student” Step 2: In the form1  Project  add new item  report change name of the report (for example “student.rdlc”) Step 3: Now in the form1 report information appear right click the report information  Insert  page header Step 4viewtool box drag Text box and place ittype “Student information”right click text box properties  change font, color, size, font style Step 5: toolbox  text box (in the page header) place the mouse in the middle of the text box and right click it  expression built-in-function page number double click Step 6: in the page footer toolbox text box place the mouse in the middle of the text box and right click it  expression common function  date or time Step 7 : toolbox table control  name of the dataset1 (by default) data source change it as (solution explorer .xsd name)  table name 13 SUMMARY FOR PREPARING REPORT
  • 14.
    Step 8: theabove design will appear- right click the “Database symbol” Step 9: insert one-by-one all the column in the table Suppose required extra column then Right click the column top  then insert column  right or left 14
  • 15.
    Step 10 newform2  toolbox  report  report viewer drag and place it  right the arrow mark in the report control –choose report select your report (bonding report) Step 11: solution explorer  vb project  properties startup form  form2 run the form 15
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.