Linq - How to add anew column with row index to datatable

Hi,
I’m looking with Linq to add to a datatable a new column with the row index value.
My goal is to keep original rows’ index as a column and then be able to retreive it in many datatable’s manipulations.

Many thanks,
JT

Hi @jtrevoux

please find below link

hope this helps

find starter help here:
AddRowIndexInfo.xaml (7.7 KB)

But in general we can also do the population within a for each row and using the index output for it

2 Likes

Thank you guys !

@ppr : very elegant way to do it.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.