Is it possible to navigate multiple tables at a time....
The two tables are joined with primary and foreign key relationship...
Pls give me some site to which i can refer or some sample code for all first,next,previous,last
I can do it when its single table....
Private Sub btnFirst_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFirst.Click
' con.Open()
If inc <> 0 Then
inc = 0
' con.Close()
NavigateRecords()
End If
End Sub
Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click
' con.Open()
If inc <> MaxRows - 1 Then
inc = inc + 1
' con.Close()
NavigateRecords()
Else
MsgBox("No More Rows")
End If
End Sub
Private Sub btnLast_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLast.Click
'con.Open()
If inc <> MaxRows - 1 Then
inc = MaxRows - 1
'con.Close()
NavigateRecords()
End If
End Sub
Private Sub btnPrevious_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrevious.Click
' con.Open()
If inc > 0 Then
inc = inc - 1
' con.Close()
NavigateRecords()
Else
MsgBox("First Record")
End If
End Sub
Private Sub NavigateRecords()
' con.Open()
txtId.Text = ds.Tables("Cust").Rows(inc).Item(0)
txtFn.Text = ds.Tables("Cust").Rows(inc).Item(1)
txtLn.Text = ds.Tables("Cust").Rows(inc).Item(2)
txtAddress.Text = ds.Tables("Cust").Rows(inc).Item(3)
txtMob.Text = ds.Tables("Cust").Rows(inc).Item(4)
txtLand.Text = ds.Tables("Cust").Rows(inc).Item(5)
Dim chkLC As String
chkLC = ds.Tables("Cust").Rows(inc).Item(6)
If chkLC = "0" Then
chkLCo.CheckState = CheckState.Unchecked
Else
chkLCo.CheckState = CheckState.Checked
End If
'con.Close()
End Sub
PLS HELP ME OUT......