I have a DataTable as shown below:
And this is the output I want:
If the names and columns can be ordered(A-Z), that would be great as well.
I know how to achieve the output, but not with LINQ, so I was hoping someone could provide some pointers on this.
Help of any kind is most appreciated, Thanks in advance!
we can interpretate the case as a certain kind of transponation.
Lets assume following sample input:
we prepare the target Datacolumn structre by a build datatable for the name column
and do add the ordered country columns
with one go we also do create an array with the country names - newColNames
Finaly we following LINQ dtData will be transposed accordingly the case requirement (flag with *)
Find starter help here:
Transponation_LINQ_NameCountry.xaml (9.3 KB)
Brilliant as always!
Thank you so much.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.