Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easy Question about Data Set

Status
Not open for further replies.

warning99

Programmer
Nov 5, 2007
53
SA
Easy Question about Data Set

Hi,,

This code show first row from Data Set in The Text Box no 16:
TextBox16.DataBindings.Add("Text", dataSet2, "GatePass.type_name")

I want code show second or third row in The Data Set.


 
Try going through some tutorials or working through some examples first. Are you looking for someone to write the code for you? That isn't going to happen here.
 
tman72

i wrote here because i can not find the answer.
 
Code:
[Visual Basic]
Private Sub GetBindingManagerBase
  ' CustomersToOrders is the RelationName of a DataRelation.
  ' Therefore, the list maintained by the BindingManagerBase is the
  ' list of orders that belong to a specific customer in the
  ' DataTable named Customers, found in DataSet.
  myBindingManagerBase = Me.BindingContext(DataSet1, _
  "Customers.CustomersToOrders")

  ' Adds delegates to the CurrentChanged and PositionChanged events.
  AddHandler myBindingManagerBase.PositionChanged, _
  AddressOf BindingManagerBase_PositionChanged
  AddHandler myBindingManagerBase.CurrentChanged, _
  AddressOf BindingManagerBase_CurrentChanged
End Sub

Private Sub BindingManagerBase_PositionChanged _
(sender As Object, e As EventArgs)

  ' Prints the new Position of the BindingManagerBase.
  Console.Write("Position Changed: ")
  Console.WriteLine(CType(sender, BindingManagerBase).Position)
End Sub

Private Sub BindingManagerBase_CurrentChanged _
(sender As Object, e As EventArgs)

  ' Prints the new value of the current object.
  Console.Write("Current Changed: ")
  Console.WriteLine(CType(sender, BindingManagerBase).Current)
End Sub

Private Sub MoveNext
  ' Increments the Position property value by one.
  myBindingManagerBase.Position += 1
End Sub

Private Sub MovePrevious
  ' Decrements the Position property value by one.
  myBindingManagerBase.Position -= 1
End Sub

Private Sub MoveFirst
  ' Goes to the first row in the list.
  myBindingManagerBase.Position = 0
End Sub

Private Sub MoveLast
  ' Goes to the last row in the list.
  myBindingManagerBase.Position = _
  myBindingManagerBase.Count - 1
End Sub

Christiaan Baes
Belgium

My Blog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top