Home All Groups Group Topic Archive Search About

How to detect hidden rows?

Author
11 Jan 2006 6:05 PM
Benton
Hi there,

Is there a way to know if a DataRow is hidden by an active
DefaultView.Filter of its DataTable? In other words, is there any way to
know if a specific DataRow will be iterated too ("visible") when iterating
the DataRowView collection of the filtered DataView?

Regards,

-Benton

Author
17 Jan 2006 3:18 PM
W.G. Ryan - MVP
Hi Benton:
"Benton" <no@spam.com> wrote in message
news:eTQ1OmtFGHA.1088@tk2msftngp13.phx.gbl...
> Hi there,
>
> Is there a way to know if a DataRow is hidden by an active
> DefaultView.Filter of its DataTable? In other words, is there any way to
> know if a specific DataRow will be iterated too ("visible") when iterating
> the DataRowView collection of the filtered DataView?
--If I understand your question correctly, the answer is 'no'.  You see,
when you use a Rowfitler, a new DataView object is created and rows that
don't meet the filter condition are simply excluded from the view.  It's not
the most efficient thing to do but you can create a second view based on the
inverse of your filter criteria - this would give you all of the rows that
were filtered out in your first pass.
Show quote
> Regards,
>
> -Benton
>
Author
17 Jan 2006 4:56 PM
Cor Ligthert [MVP]
>  It's not the most efficient thing to do but you can create a second view
> based on the inverse of your filter criteria - this would give you all of
> the rows that were filtered out in your first pass.

Why not efficient. Efficient is the best method that fits the goal, in my
case do you describe that well.

(You mean probably not forever the most easiest way if the rowfilter is
complex)

I think that there are other methods however those are in my opinion less
efficient. One of those is looping through the datatable and use the
dataview.find than if it exist in the dataview.

:-)

Cor

AddThis Social Bookmark Button