Re: Remove Row from a DataView
- From: Marc Gravell <marc.gravell@xxxxxxxxx>
- Date: Wed, 06 Jun 2007 21:26:16 -0700
but this does not seem to work
So what *does* happen? Does the count change?
First - you need to be very careful removing from a loop you are
iterating - the code you have is susceptible to cumulative "off by
one" errors every time it deletes - so with 2 adjacent youngsters only
the 1st would disappear. Perhaps iterate backwards instead? (or see
below).
There is no guarantee that the order is the same in the view and the
table (if a sort is set on the view), so if the wrong rows are
disappearing perhaps you should be removing from the view (which will
talk to the table).
Perhaps an easier option is to set a RowFilter against the view? that
way they simply don't appear, as opposed to removing them from the
system just because they can't buy beer (or whatever).
Marc
.
- Follow-Ups:
- Re: Remove Row from a DataView
- From: MarkusJNZ
- Re: Remove Row from a DataView
- References:
- Remove Row from a DataView
- From: MarkusJNZ
- Remove Row from a DataView
- Prev by Date: Re: First file within a directory
- Next by Date: Re: DCOM
- Previous by thread: Remove Row from a DataView
- Next by thread: Re: Remove Row from a DataView
- Index(es):
Relevant Pages
|