[Help] Remove Duplicates based on ID Number

Hi All,

I would like to remove duplicates and only get the row that comes first based on UIN/FIN

From
image

To
image

Please help.

Thanks in advance.

assign Activity

dtResult =

(From d in YourDataTablevar.AsEnumerable
Group d by k=d("UIN/FIN").toString.Trim into grp=Group
Select r=grp.First()).CopyToDataTable

Also have a look here:

@Shawn11
dt_Duplicates.AsEnumerable().GroupBy(Function(i) i.Field(Of String)(“UIN/FIN”)).Select(Function(g) g.First).CopyToDataTAble

regards