Display contents of Datarow

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?

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

7 Likes

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

2 Likes

Hi @Pratiksha,

Then mark that as a solution:slight_smile:

Thanks,
Girish

1 Like

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