How to get correct result from comparing DataRow from same Datatable

I met an issue that I tried to find the index of an DataRow(name as “rowSelected”) which was come from its source DataTable(name as “sourceDT”) after Select(). I checked their content and they are same, but when I used “sourceDT.Rows(rowSelected)” it always can’t find the index.

Is there any ideas can help me solve this problem or some points I need to check it correct or not?

Thanks in advance

Information on the position (index) from row in Datatable is not available in a Select without doing additional things.

Check following options

  • dtVar.As Enumrable.toList and then use FindIndex Function
  • LINQ Statement with indexed Select on the Begin

If you need more support then please share some more details (Requirements, Sample values) with us