Help with for each datarow loop

some parts could be avoided (e.g. heavy dt text outputting, as we can do inspections with the debugging panels)

We would recommend to use for the filter output a seperate variable: dtFiltered

As a group by is implemented also have a look here:

Maybe you want to shift to a groupby LINQ