dataview wildcard searches

From: John Hernry (john.henry_at_sasktel.com)
Date: 10/31/04


Date: Sun, 31 Oct 2004 10:33:47 -0700

I have a datagrid that is bound to a dataview. I am looking to create a
form that will perform wildcard searches on the dataview and move the
datagrid to the found row.

I can get the find to work in that it returns a valid row, but it is not the
first row with that value. I suspect that it is because it is not a unique
value in that column. I also can't perform wildcard searches.

Here is my search code
Dim dvData As DataView
Dim cmBkMrk As CurrencyManager

dvData = Me.dgrCatalogue.DataSource
dvData.Sort = "Artist"
cmBkMrk = Me.dgrCatalogue.BindingContext(dvData)
cmBkMrk.Position = dvData.Find("Triumph")
Me.dgrCatalogue.Select(cmBkMrk.Position)

If you have ever used the find in Access I am trying to build something
along that line. Where I can specify criteria such as: search in one field,
all fields, at the beginning of the field, end of the field, must match the
entire field, or case sensitive etc. My database currently has 30,000
records with 5 fields: ID, Source, Song, Artist, Album. ID is the primary
key.

I suspect that I am going to have to create a second dataview of the table,
do a filter on it, find the record I need (which will likely have to still
be done by looping through the filtered records, but at least far less of
them), get the unique ID from the found record then find that ID on the
displayed dataview and move to that record. . I was hoping for a quicker
method as this method will be slow.

Thank you in advance

John



Relevant Pages

  • Re: dataview wildcard searches
    ... It allows a wildcard search and returns all rows in which the search ... contents of the cloned table - ie, a datagrid full of matches. ... Dim DTCloned As DataTable = DTOriginal.Clone ... > I have a datagrid that is bound to a dataview. ...
    (microsoft.public.dotnet.languages.vb.controls)
  • dataview wildcard searches
    ... I have a datagrid that is bound to a dataview. ... I also can't perform wildcard searches. ... be done by looping through the filtered records, but at least far less of ...
    (microsoft.public.dotnet.languages.vb.controls)
  • Re: Has anyone done this before?
    ... That's because WildCard P will return everything that has a p in it. ... > I then declared a dataview and created it and assigned it to the datagrid. ... > Surname is the 2nd column in the dataview that i want to filter data on. ...
    (microsoft.public.dotnet.general)
  • Re: Datatable interer Original-Index beim Sortieren
    ... Du brauchst beim DataGrid keine Datenbank. ... Grid holt sich die Daten aus einem Puffer. ... DataView usw. sein. ... legt über die eigentliche DataSource eine ArrayList, ...
    (microsoft.public.de.german.entwickler.dotnet.datenbank)
  • Re: DataGrid Row Searching
    ... This is what I ended up with - you pass in a dataview and the key value you ... that index is the same as the row in a DataGrid. ... How do I select a cell in a datagrid based on its primary key/ID, ... I have a datagrid bound to the dataset, with datamember = Employee ...
    (microsoft.public.dotnet.framework.adonet)