Question about navigating a recordset in vb.net 2005

  • Thread starter Thread starter Markei54545
  • Start date Start date
M

Markei54545

Hi all,

I have a very simple form in vb.net 2005. It has a few data bound
fields (created by dragging fields over from the data sources
explorer) and has created the following on the form..

dataset
Bindingsource
TableAdaptor
BindingNavigator

The navigator object has arrow buttons on it to go to the next record,
last record etc.

I just want know, how can I programatically get the screen to flick to
the next record, rather than clicking on the arrow.

Hope that makes sense.

Mark
 
Hi all,

I have a very simple form in vb.net 2005. It has a few data bound
fields (created by dragging fields over from the data sources
explorer) and has created the following on the form..

dataset
Bindingsource
TableAdaptor
BindingNavigator

The navigator object has arrow buttons on it to go to the next record,
last record etc.

I just want know, how can I programatically get the screen to flick to
the next record, rather than clicking on the arrow.

Hope that makes sense.

Mark

Actually, the bindingsource object provides "position" property and
makes easy to navigate to next record just by specifying position
index. So, i would:

' Move next record
Me.myBindingSource.Position += 1
' Assuming "myBindingSource" is your bindingsource object.

or just use ' MoveNext method

Me.myBindingSource.MoveNext()

' For last record
Me.InstructorsBindingSource.MoveLast()

....MoveFirst and MovePrevious are also available.

HTH,

Onur
 
Be aware that you for sure not are using a recordset. A recordset is a class
from Ado or/and Dao.

The bindingnavigator does not function with a recordset, it uses mostly a
datatable.

Success

Cor

"Markei54545" wrote in message

Hi all,

I have a very simple form in vb.net 2005. It has a few data bound
fields (created by dragging fields over from the data sources
explorer) and has created the following on the form..

dataset
Bindingsource
TableAdaptor
BindingNavigator

The navigator object has arrow buttons on it to go to the next record,
last record etc.

I just want know, how can I programatically get the screen to flick to
the next record, rather than clicking on the arrow.

Hope that makes sense.

Mark
 
Back
Top