DataRow issue

I have the add queue item within a foreach loop. When I try to create the collection using row.item(“columnname”).ToString I get the message datarow does not contain a definition for item and no accessible extension method item. row.itemarray is available, but not item. Any help would be greatly appreciated.

Hi

Try mentioning like this if it’s Vb net set as language

row(“columnname”).ToString.Trim

Make sure your FOR EACH ROW variable name is row

Cheers @Nenna_Anya

Hi,

Can you try the following?

row["columnname"].ToString()

Regards,

Thank you Yoichi…

1 Like

The reason is you would have chosen c# as language while creating the project
You can change the settings here

Home tab → Settings → Design → under Design style disable use C# language

This will accept the current expression itself

row.item(“columnname”).ToString

Cheers @Nenna_Anya