I have a input datatable as below. I want to check and remove the row if they have same value at “item” Col and the value at “status” Col equals “OK”
I have made linq code as below but it run not correctly.
Is there any wrong in my code? and how to fix it?
Thanks in advance!
(From row In Table.AsEnumerable()
Group row By k1= row(“item”).toString.Trim,k2= row(“status”).toString.Trim.Where(Function(g) g.ToString.Contains(“OK”)) Into grp=Group
Let r = grp.Last
Order By Array.IndexOf(Table.AsEnumerable.toArray,r)