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?
Have a look at the DataView RowFilter.
I stumbled across this today.
A snippet of the code I'm using is:
Dim dv As New DataView(tblNewExchangeRatesTable)
dv.RowFilter = "Country = 'EUROPEAN COMMUNITY (EU)'"
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...
I figured it out. I'm querying the database for the value of the textbox after each char in entered. This works great.
By sonia in forum VB Classic
Last Post: 01-29-2003, 09:40 AM
By Bob in forum VB Classic
Last Post: 03-14-2002, 03:27 PM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center