V
VMI
I'm trying to some dynamic searching to my windows Form so I added code in
my TextBox.TextChanged so that, after every text change, a search is done to
a datatable. So if I want to type the string "Memphis", it'll do a search
(and display) all the items after the user types "M", then another search
(of "Me") when the user types "e", another search of "Mem" after "M", and so
on. The problem is that there's so much data in the table that each one of
these searches is very slow, and I can't use a primary key because it
searches in all columns (there's three).
Is there any way that I can delay the TextChange so it only executes if the
user doesn't type anything for, say, a second? Or is there any way I can do
this?
Thanks.
my TextBox.TextChanged so that, after every text change, a search is done to
a datatable. So if I want to type the string "Memphis", it'll do a search
(and display) all the items after the user types "M", then another search
(of "Me") when the user types "e", another search of "Mem" after "M", and so
on. The problem is that there's so much data in the table that each one of
these searches is very slow, and I can't use a primary key because it
searches in all columns (there's three).
Is there any way that I can delay the TextChange so it only executes if the
user doesn't type anything for, say, a second? Or is there any way I can do
this?
Thanks.