DataRow index within a DataRowCollection

  • Thread starter Thread starter Brian
  • Start date Start date
B

Brian

Is there anyway to determine the index of a DataRow within a
DataRowCollection?

I am using the Find() method of the DataRowCollection on my table to get me
the record I am looking for, but it is returning a DataRow object and not
the index of the object. Is there another way to find this? All I can find
is Find()and Contains().

Thank you,

Brian
 
try IndexOf

Example:
Debug.WriteLine("Indexof " & e.Index & " " & CType(cboComp.DataSource,
DataRow()).IndexOf(CType(cboComp.DataSource, DataRow()),
CType(cboComp.DataSource, DataRow())(e.Index)))
 
Back
Top