filter function on dataset in vb.net 2005

Hi,

I have the following code: -

    Private Sub cmdShowReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdShowReport.Click
        Dim a As Integer
        Dim dv As DataView = ds2.Tables("Tests").DefaultView
        For a = 1 To 32

            Dim row As DataRow = DataSet1.Tables("Test_Report").NewRow

            dv.RowFilter = "TestID = " + a.ToString()
            If dv.Count > 0 Then
                MsgBox("Found")
                row("TestID") = ds2.Tables("Tests").Rows.Item(1).Item(1)
                row("Score") = ds2.Tables("Tests").Rows.Item(1).Item(0)
            Else
                row("TestID") = a
                row("Score") = "0"
            End If
            DataSet1.Tables("Test_Report").Rows.Add(row)
        Next

        DataGridView3.Refresh()
    End Sub

IT will filter and show 1 record using dv.RowFilter = "TestID = " + a.ToString()
But I am trying to find out how I set the dataset back to an unfiltered state please as before I placed the filter on it.

Hope this makes sense.

Lee
ljhodgettAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TimCotteeHead of Software ServicesCommented:
Just set it empty:

dv.RowFilter = ""
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ljhodgettAuthor Commented:
lol, Never thought of that.

The only issue I have now is how do I get the data from lets say the first row of the returned filter in the second column ie if it returns: -

1                     6

How do I retrieve the 6

Many Thanks
Lee
0
TimCotteeHead of Software ServicesCommented:
That should be:

        dv.Item(0).Item(1)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.