DataView Rowfilter

I am loosing my mind on this :)

I have a dataview and I am doing something like this
dv = ds.Tables(0).DefaultView
At this point if I dodv.Table.Rows.Count It returns 5

If I dodv.RowFilter =" pos = '1' " where pos is one one of the column

dv.Table.Rows.Count returns 5 when it should have returned 2 .There are 2 records with pos=1

I am not sure what Iam doing wrong

ANy help is appreciated.

thanks

[850 byte] By [MKyE] at [2007-12-26]
# 1

I think you try to get count by using this property

int records = dv.count ;

It will return you count 2. You should not you dv.table.Rows.Count property.

let me know if you need any code for this

jainvikr2 at 2007-9-4 > top of Msdn Tech,.NET Development,.NET Base Class Library...

.NET Development

Site Classified