How to loop the columns in Datatable

I have datatable where it contains single row like below

image

I want loop this as column value instead of Foreachrow, i need something like Foreachcolumn. how can i achieve this?

Can leads helps me

Hi @Chaitan,

You can apply as in the image.

image

Regards,
MY


when you want loop via the datacolumns

when interested on the values from first row we also can do:

I want to loop the First row values

Ex: in For each i want to get values like below
1
50961
5/26/2022
1908996
like these it should loop only first row
can you give me logic step by step

both screenshots will do and do show all details. just try it

GOT it thanks

You Have Only Single Row in the Datatable

If You Want value in 1st Column

DT.Rows(0)(0).Tostring

If You Want value in 2nd Column

DT.Rows(0)(1).Tostring

Repat Same Thing upto which column you want .

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