Try to compare the Row of the DataRowView :
public static int GetIndex(this DataRowView rowView)
{
for (int i = 0; i < rowView.DataView.Count; i++)
{
if (rowView.DataView[i].Row == rowView.Row) // <-----
return i;
}
return -1;
}