I want to print string data side by side in Datatable

Hello everyone,

The number of rows in this datatable is not fixed.


I want it to save “resource” data side by side to “fullResource” every time the loop returns.

For example, there are 3 data.

first Max
second Lewis
third Valtteri

What I want is for him to write " Max - Lewis - Valtteri "

Thanks !!

Hi @MrKezay

Use the below steps to achieve without looping!

Use assign

NewValueArrayStr =readDt.AsEnumerable.Select(function (row) row("YourColumnnameOrIndex).ToString).ToArray

Write line



1 Like

Use Output data table and store the value in “val” string variable.



1 Like


Create a variable before for each loop to count the data table rows since it is not fixed.

DTRwoCount = dt.rows.count

if condition → currentindex = DTrowcount

then part:

full resource = full resource + resource

else part

full resource = full resource + resource + “-”

i think the above flow would give you the result. thanks.

if you do not go for linq the above logic would help. if you want go with linq please follow our forum members suggestion. thanks.

1 Like