How to group rows that share similar information into one row

@harizd
give a try with this xaml Main.xaml (11.0 KB)
you can make changes in xaml according to your need

content of xaml:

dt_old >> old DataTable

new datatable dt
dt.Columns.Add("Col1", GetType(String))
dt.Columns.Add("Col2", GetType(String))
dt.Columns.Add("Col3", GetType(String))

dt = (From p In dt_old.AsEnumerable()
Group By x= New With { Key.a =p.Item(“Col1”),Key.b=p.Item(“Col2”)}
Into Grp = Group Select dt.LoadDataRow (New Object() {grp(0)(0), grp(0)(1),String.Join(";",grp.select(Function(c) c("Col3")))},False)).CopyToDataTable
6 Likes