What is the best way to search in a DataSet and show results???
DataView.Find or to query DB and to fill DataSet?
Thanx
Here is the best and fast one
Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles btnSearch.Click
'Create and fill the dataset
Dim ds As New DataSet()
ds.ReadXml(Server.MapPath(".") & "\..\Xml\PartList.xml")
'Set a primary Key
ds.Tables(0).PrimaryKey = New DataColumn() {ds.Tables(0).Columns("partid")}
'Create a datarow collection
Dim drCollection As DataRow()
'Use the tables.select command and pass in your search criteria
drCollection = ds.Tables(0).Select("manufacturer = '" _
& Replace(txtSearch.Text, "'", "''") & "'")
'Display results by looping through datarow collection
Dim dr As DataRow
lblResults.Text = ""
For Each dr In drCollection
lblResults.Text = lblResults.Text & dr.Item("partid").ToString & ","
Next
'Dispose item
ds.Dispose()
End Sub