DataTable row number
Can i get the row number of one record from a DataTable, after searching it with it's find() method?
Thank you
Joaquim
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
SimonPosted Apr 6, 2007, 6:32 PM
It seems to me that you can't retreive the row number from a DataRow, but if you create a new DataView according to your existing DataTable dans use it's Find method, it returns a row index.
For example :
DataView dv = new DataView(myDataTable); int rowIndex = dv.Find(myKey);
Hope this helps!
Simon