Hello all,
I have a datatable that has several identical values in the first column and the details in the second column.
My goal is to group/filter all the same values in column 1 and then for each get me the values from column 2. The whole thing works with the following linq command I found, however my problem is that I want to add values in column 3 for the single value in column 2.
List = (From d In in_DT_From_CSV.AsEnumerable
Where System.Text.RegularExpressions.Regex.IsMatch(d(“Column2”).ToString,“\b70\d{10}\b”)
Where d(“Column3”).ToString=“”
Group d By k=d(“Column1”).toString.Trim Into grp=Group
Select g=grp.CopyToDataTable).ToList
List.Item(int_Column1).Rows(int_Row)(“Column3”) = “new Value”.
Write range does not write values