Datatable navigation row number

cpopham

Well-known member
Joined
Feb 18, 2004
Messages
273
It has been a while since I have done this. How do I navigate through a datatable and get the datarow number of the current record?

I thought that it would be something like this:
Code:
go to first record
 me.BindingContext(dsVeh.Tables("tblVeh").Position = 0

go to next record
 me.BindingContext(dsVeh.Tables("tblVeh").Position +=1
[\code]

That code is giving me an error though by saying Position is not a member of bindingcontext.

And I do not know how to get the current row number of the datatable, only the total count.

Thanks,
Chester
 
Okay, I got that figured out now:

Me.BindingContext(dsVeh, "tblVeh").Position = _
(Me.BindingContext(dsVeh, "tblVeh").Position + 1)

But now how do I place the current information into the controls. I am not using databinding. I would like to have something like:

txtNumber = dsVeh.Tables("tblVeh").Rows(currenttRow).Columns(1).tostring,

But I can not find out how to do this. Anyone have any ideas?

Thanks, Chester
 
Back
Top