Findstring and a Datagridview


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Findstring and a Datagridview

  1. #1
    Join Date
    Jul 2004
    Posts
    365

    Question Findstring and a Datagridview

    Is there a way to find a string in a datagridview column? I'm allowing the user to search by typing in a textbox and I want the grid to display the data it finds as the user types. Can this be done with a datagridview?

    Thanks all.

    jb

  2. #2
    Join Date
    Jan 2007
    Posts
    24
    Have a look at the DataView RowFilter.
    I stumbled across this today.
    A snippet of the code I'm using is:

    Code:
    Dim dv As New DataView(tblNewExchangeRatesTable)
    dv.RowFilter = "Country = 'EUROPEAN COMMUNITY (EU)'"

  3. #3
    Join Date
    Jul 2004
    Posts
    365
    What I'm needing to do is, as the user types in the search textbox, the reocord in the grid is highlighted. So the user could put in a D, so the first record with a D is highlighted, then they put an A and this first record with a DA appears. How would I make this happen?

    Sorry if I seem to be dumbing it down, no offense to anyone...

    Thank you in advance...

    jb

  4. #4
    Join Date
    Jul 2004
    Posts
    365
    I figured it out. I'm querying the database for the value of the textbox after each char in entered. This works great.

    Thanks all.

Similar Threads

  1. Quick Search!
    By sonia in forum VB Classic
    Replies: 2
    Last Post: 01-29-2003, 08:40 AM
  2. Need Help with VBA for Excel
    By Bob in forum VB Classic
    Replies: 0
    Last Post: 03-14-2002, 02:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center