MattB <(E-Mail Removed)> wrote in
news:(E-Mail Removed):
> Dim dr As DataRow
> For Each dr In dvAuto.Table.Rows
> dr.Delete()
> Next
> End If
>
> But obviously it didn't work. I suspected modifying a collection while
> looping through it would be a no-no and I was right (but tried
> anyway).
Use a for loop and count backwards. If ir you want to clear all, just call .Clear.
--
Chad Z. Hower (a.k.a. Kudzu) -
http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
Blog:
http://blogs.atozed.com/kudzu