G
Guest
Hi,
I'm trying to use the RowFilter property...but with no luck...
Dim pdstSample As New DataSet
pdstSample.Tables.Add(New DataTable("tblSample"))
Dim pdtbSample As DataTable = pdstSample.Tables(0)
pdtbSample.Columns.Add(New DataColumn("fldSample"))
Dim pdrwSample As DataRow = pdtbSample.NewRow()
pdrwSample(0) = "Sample"
pdtbSample.Rows.Add(pdrwSample)
pdrwSample = pdtbSample.NewRow()
pdrwSample(0) = "Elpmas"
pdtbSample.Rows.Add(pdrwSample)
Dim pdvwSample As New DataView(pdtbSample)
MsgBox(pdvwSample.Table.Rows.Count)
pdvwSample.RowFilter = "fldSample = 'Sample'"
MsgBox(pdvwSample.Table.Rows.Count)
The two msgbox lines return 2 even though it should filter 1 row...please
help.......
Jag
I'm trying to use the RowFilter property...but with no luck...
Dim pdstSample As New DataSet
pdstSample.Tables.Add(New DataTable("tblSample"))
Dim pdtbSample As DataTable = pdstSample.Tables(0)
pdtbSample.Columns.Add(New DataColumn("fldSample"))
Dim pdrwSample As DataRow = pdtbSample.NewRow()
pdrwSample(0) = "Sample"
pdtbSample.Rows.Add(pdrwSample)
pdrwSample = pdtbSample.NewRow()
pdrwSample(0) = "Elpmas"
pdtbSample.Rows.Add(pdrwSample)
Dim pdvwSample As New DataView(pdtbSample)
MsgBox(pdvwSample.Table.Rows.Count)
pdvwSample.RowFilter = "fldSample = 'Sample'"
MsgBox(pdvwSample.Table.Rows.Count)
The two msgbox lines return 2 even though it should filter 1 row...please
help.......
Jag