Administrator

Administrator

  • Tech Writer
  • 2.2k
  • 1.5m

It shouldn't be this tough. Finding records

Feb 19 2003 3:41 PM
OK, I need to find the index of a specific row in a dataset based on field value criteria, such as social security number. I've tried using a dataview and the Find() method, but that requires that you SORT on the column that your are searching on first. That's great, but it returns and index that does not match the index of the original DataTable that I am searching. This is not at all beneficial. I could use the DataTable.Rows.Find method as well, but that requires that one search on the Primary Key. This is no use to me. I simpky want to be able to search on a specific column and get the row index that it finds the value in. Am I REALLY goinf to have to loop through all the rows and check the column value??? That would be really disgusting.

Answers (6)