Removing data rows

Hi guys,

I’m try’ing to remove a certain datarows. But it sends me this error. I cant find the solution to this issue. Can anyone shine some light on these methers.

Thanks in advance!
Kind Regards

@Joeri_Rethy
Cannot manipulate the same datatable which is used in foreach.

You can’t change the length of a datatable when you’re iterating through it.
Please use Datable.Select statement to prepare a new DT with the rows which you need.

Thanks for the fast repleys,

But if i iritate trough this dataTable and save the rows in to an other column. It keep returning that the object is not there.

Please keep in mind that the initial dataTable is not FIXED. It is a report that changes… even the headers.

Use assign Activity

datatableHp = new datatable()

second assign

datatableHp = datatable.clone

then use for eachrow

1 Like

Worked like a charn! just had to add row.itemArray to the input value ArrayRow. Instead of DataRow.
Thank you verry much kind sir!

@Jagdish2593
DataRow also Works.

and

Both are one and the same

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