Steve:
The DataTable's Rows.Count is totally isolated from the rowfilter. Nothing
you can do via the Rowfilter will have any effect on this whatsoever. If
DataView dv = myDataTable.DefaultView;
then anything you do to DV via a rowfilter won't affect myDataTable.
I'm not sure I understand your problem, but regardless of how it was
implemented, you should be good to go. I have x = myDatatable.Rows.Count.
Now, I create 3 views, a, b, and c, all based on myDataTable. If I apply a
filter to a, I can use a.Count to get that number. Now I can apply another
filter to b, again retrieving b.Count. If I need the filter to be
cumulative, then I can simply concatenate the conditions, provided of course
that they don't conflict with each other. If each is a subset of the first
then this won't be the case. finally I use c.Count. Since I grab each
value at each point when filter is set, the variably I use for each will in
fact hold the correct value as of the point in time the filter was applied.
All along the underlying datatable's rows.Count will never change. So you
can have each at a given point to get the respective value. Subtracting
that number from Rows.Count of the datatable will give you the number of
records NOT meething that condition and by applying everything with AND's
you can still get the cumulative effect. If you don't want it cumulatively,
then just don't use Ands.
HTH,
Bill
--
W.G. Ryan, eMVP
http://forums.devbuzz.com/
http://www.knowdotnet.com/williamryan.html
http://www.msmvps.com/WilliamRyan/