You cannot get index of the row. But, since your Row points to the actual
row in a datatable, sometimes it could help to find some workarounds. It
just depends on what you are tying to do
You can get the index of a row when you set it up in a manner that will
yield that index. For example, let's say you are trying to find custid
'00087' and then get that customer's address. You can do this is a multitude
of ways, but one of the most common is to use a dataview. Here's a skeleton
of it:
Dim arrayseeks(0) As Object
Dim ifinds As Integer
Dim vues As New DataView(dsshipcode.Tables(0))
vues.Sort = "shipcode"
arrayseeks(0) = "03"
ifinds = vues.Find(arrayseeks)
If ifinds <> -1 Then ' ie, found it
mdescrip = vues(ifinds)("descrip")
Else
mdescrip = ""
End If
ifinds is an integer - its number is the index of the datatable in the order
as specified. If you have any questions about this, let me know - I'll be
glad to help.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.