Delete datarow in datatable




How do you delete currently datarow without use Excel.
I use in my for Each Row the “Remove Data Row” activity. But i don’t know how you fill the row and row index in options…



you either fill one or the other.
Row: here you would add the variable used in the For Each activity (presumably row).
RowIndex: here you would add the row index in case you don’t have a var. ie. if you add 0 it will delete the first row, 1 will delete the second row and so on…


You cannot remove rows while iterating a datatable(dt.Rows).

You need to Perfrom dt.Select —> and remove rows from Foreach DataRow Array


Inside Foreach dt.Rows—> Add your to be deleted rows into List and then delete those rows in Foreach List Iteration.


@vvaidya I saw you can use a reverse for loop in order to not change collection.
Is it possible to do that ?



May be this post will help you:



Good Job


this is working fine.thank you.

but if instead of passing PV directly i am having this PV in one string variable then how can i pass ?

and how can i pass if am having 2 conditions for example, if status= “PV” and name =“akash”