Udi Goldstein

Udi Goldstein

  • NA
  • 22
  • 63.1k

Dynamically changing datagridview

Aug 6 2010 12:00 PM
Hi, I have this problem with DataGridView:

Let's say I have a database with two fields: Name and Code, the Name consists words that the starts with the letter "A" and the code represents a unique code for the word. For example: Apple is 1, Airplane is 2 and so on.
I want to display in Datagrid the words and their relative code, but the catch (for me that is), that I want it to dynamically change using "textbox_textchange", for example: If I type "Al" I want only words that start with "Al" to be displayed, if I type "Alr" I want only words that start with "Arg" to be displayed. I got the code for the database, textchange and dataset, but I don't know how to control the datagridview to do it. I want it to narrow the list automatically as I type more letter (like a filter).

Thanks in advance,
Udi

Answers (1)