DataSet Filter

  • Thread starter Thread starter Eddy Balan
  • Start date Start date
Hi Eddy,

You have to tell more what you want,

Because you can use by instance
dataset.select
dataset.compute
add a dataview
itterate throught the dataset with different methods
Please tell me how can I filter a dataset..!!!???? :-(((

So tell what you want to do, maybe we can help you?

Cor
 
Here's an example.

Me.dview = New DataView(Me.tablePeople)

dview.RowFilter = "FirstName = 'Terry'"

Me.dg3.DataSource = dview

In this example, I create a DataView of my table tablePeople, and then I
set the DataSource of my datagrid dg3 to that view, before this I filter on
my own name, this returns one record in my case. I also could have sorted
this differently for example.



OHM#






Eddy said:
Hi,

Please tell me how can I filter a dataset..!!!???? :-(((

Eddy

Regards - OHM# (e-mail address removed)
 
If Me.txtKey.Text = "" Then
Me.Ds.Tables("MFM").Clear()
Me.view_MF.Parameters("@Key").Value = "n/a"
Me.daviewMFM.Fill(Me.Ds, "MFM")
Else
Me.Ds.Tables("MFM").Clear()
Me.view_MF.Parameters("@Key").Value=Me.txtKey.Text
Me.daviewMFM.Fill(Me.Ds, "MFM")
End If

At the moment I'm using a stored procedure witch I called every time the
textbox change to filter the dataset (this procedure require too many
resources). I've tried to use the select command but no results.

Regards
Eddy
 
Back
Top