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

Re: DataRow index within a DataRowCollection by AMDRIT

AMDRIT
Wed Sep 28 14:52:36 CDT 2005

try IndexOf

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

"Brian" <brian.golding@gmail.com> wrote in message
news:e69rsf4wFHA.2652@TK2MSFTNGP14.phx.gbl...
> 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
>