find the position of a record in the datatable

gouthamsworld

Member
Joined
Oct 22, 2007
Messages
7
Programming Experience
1-3
hi
is there a way to find the position of a record in a dataset..

like in VB we have PERCENTPOSITION property

how to achieve this kind of resukt in vb.net

can anyone help
???

thanks
 
I thought PercentPosition was used for displaying a progress bar with the position of the record?!?

In VS2005, you simply use the BindingSource.Position

or you can set a BindingNavigator to that BindingSource and then it'll display the current row in the form of "x of y"

However, I found this on another forum if you really want the PERCENTPOSITION (it doesn't work in ADO is the reason why it doesn't work in VB.Net)

Dim x As Long
x = rst.RecordCount

rst.MoveFirst
Do Until rst.EOF
''''code for search
ProgressBar1.Value = (rst.AbsolutePostion / x) * 100
rst.MoveNext
Loop
 
Back
Top