Display contents of Datarow

datatable
activities

#1

Hello,

I am trying to get entire row of a datatable ‘DT’ into a datarow variable ‘DREntireRow’ satisfying certain condition using a ‘Select’ method.

DREntireRow= DT.Select( "Column1 =’’ ")

Now I want to see the contents of this variable. I used ‘For each’ loop and did a writeline of item.ToString, but all it displays is System.Data.Datarow[].

Can someone help me with this?


#2

Hi @Pratiksha,

Please change the data type in “For each”, browse date type as shown below:

You can display each item in array by using this above type.

Thanks,
Girish


#3

Thanks, it worked.
Also, while displaying within the for each loop, we have to treat item as a datarow and write item(0).ToString for the first column


#4

Hi @Pratiksha,

Then mark that as a solution:slight_smile:

Thanks,
Girish


#5

A post was split to a new topic: Cannot find DataRow[] variable type