473,769 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Search as you type

Is there any known implementation of search as you type (in a db) in c#. Say
for argument sake, as I type in the 1st name the number of names in my
combobox decrease.
--
L. A. Jones
Jan 15 '08 #1
14 5788
"Dave" <Da**@discussio ns.microsoft.co mwrote in message
news:E2******** *************** ***********@mic rosoft.com...
Is there any known implementation of search as you type (in a db) in c#.
Say
for argument sake, as I type in the 1st name the number of names in my
combobox decrease.
You need to implement this yourself. It's not difficult

SELECT * FROM People WHERE FirstName LIKE abc%

Michael
Jan 15 '08 #2
What event I would need to attach this code to?
--
L. A. Jones
"Michael C" wrote:
"Dave" <Da**@discussio ns.microsoft.co mwrote in message
news:E2******** *************** ***********@mic rosoft.com...
Is there any known implementation of search as you type (in a db) in c#.
Say
for argument sake, as I type in the 1st name the number of names in my
combobox decrease.

You need to implement this yourself. It's not difficult

SELECT * FROM People WHERE FirstName LIKE abc%

Michael
Jan 15 '08 #3
"Dave" <Da**@discussio ns.microsoft.co mwrote in message
news:9D******** *************** ***********@mic rosoft.com...
What event I would need to attach this code to?
The change event for the textbox. Where are you getting the list of names
from? I was assuming a database which might not be correct.

Michael
Jan 15 '08 #4
KeyUp of the TextBox would be a good candidate.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com
"Dave" wrote:
What event I would need to attach this code to?
--
L. A. Jones
"Michael C" wrote:
"Dave" <Da**@discussio ns.microsoft.co mwrote in message
news:E2******** *************** ***********@mic rosoft.com...
Is there any known implementation of search as you type (in a db) in c#.
Say
for argument sake, as I type in the 1st name the number of names in my
combobox decrease.
You need to implement this yourself. It's not difficult

SELECT * FROM People WHERE FirstName LIKE abc%

Michael

Jan 15 '08 #5
Peter Bromberg [C# MVP] wrote:
KeyUp of the TextBox would be a good candidate.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com
Isn't there a way to bind to a Data Source for autocompletion?

Chris.
Jan 15 '08 #6
"Peter Bromberg [C# MVP]" <pb*******@yaho o.NoSpamMaam.co mwrote in message
news:04******** *************** ***********@mic rosoft.com...
KeyUp of the TextBox would be a good candidate.
That's not really a good way to do it because they could change the text in
the textbox without using the keyboard. Changed event is probably better.

Michael
Jan 15 '08 #7

"Chris Shepherd" <ch**@nospam.ch sh.cawrote in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
Peter Bromberg [C# MVP] wrote:
>KeyUp of the TextBox would be a good candidate.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com

Isn't there a way to bind to a Data Source for autocompletion?

Chris.
Yes, there is. It is outlined brilliantly in Brian Noyes' DataBinding book.
Let me know if you want more info, and I'll dig it up and post the code
example. (Awesome book, by the way, worth the $ for the datagridview stuff
alone.)

RobinS.
GoldMail, Inc.

Jan 18 '08 #8
Yes, the book does cover using the DGV in virtual mode. I will post either
the code for the AutoComplete (I'm using it for one of my comboboxes), or
a link where you can find it, this weekend.
RobinS,

thank you.
Will this code allow to use AutoComplete in a Combobox placed in Virtual
Mode DataGridview ?
Will autocomplete work OK overv low speed internet ?

Andrus.
Jan 24 '08 #9
I don't know why not. Using AutoComplete involves keeping a local copy of
the table. I'll post it this weekend.

RobinS.
GoldMail, Inc.
-----------
"Andrus" <ko********@hot .eewrote in message
news:u4******** ******@TK2MSFTN GP06.phx.gbl...
>Yes, the book does cover using the DGV in virtual mode. I will post
either the code for the AutoComplete (I'm using it for one of my
comboboxes), or a link where you can find it, this weekend.

RobinS,

thank you.
Will this code allow to use AutoComplete in a Combobox placed in Virtual
Mode DataGridview ?
Will autocomplete work OK overv low speed internet ?

Andrus.
Jan 25 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2284
by: Greg | last post by:
I have a page that searches a database by a repairman's name and by a date range. It pulls info by the repairman's name but pulls all info in the database regardless of the date. Below is the code of the two pages. What am I missing? This page calls the script datersearch.php ************ searchrdates.php ************
1
8727
by: Les Juby | last post by:
A year or two back I needed a search script to scan thru HTML files on a client site. Usual sorta thing. A quick search turned up a neat script that provided great search results. It was fast, returned the hyperlinked page title, filename, and the body txt (30 preceding and following words) in context with the search word highlighted. Excellent.! See it working at: http://www.ipt.co.za Just search for "firearm"
4
2412
by: Jan | last post by:
I am having problems trying to print a report based on a form. This is a search form only, no data input. There is a query that the form looks at, but then there are numerous comboxes that you can pick information from either one or many and press a search button. See code below for the "Case Select" that was used to make up the comboboxes. Not a filtered list. My problem is that when I try to print, it prints all records before the...
4
2171
by: BenCoo | last post by:
Hello, In a Binary Search Tree I get the error : Object must be of type String if I run the form only with the "Dim bstLidnummer As New BinarySearchTree" it works fine. Thanks for any help on this, Benny
0
2080
by: | last post by:
I have a question about spawning and displaying subordinate list controls within a list control. I'm also interested in feedback about the design of my search application. Lots of code is at the end of this message, but I will start with an overview of the problem. I've made a content management solution for my work with a decently structured relational database system. The CMS stores articles. The CMS also stores related items --...
1
2529
by: cglewis03 | last post by:
Hello, I am trying to build a search form with several different options to choose from. Currently it is set up to open within the same window if a single option is selected and open within a frameset if the "ALL" option is selected. Is there anyway to get the results to open in new windows? So if the user were to select the "ALL" option, is it possible to open 3 new windows with each result displaying? Here is my code:
1
7552
Merlin1857
by: Merlin1857 | last post by:
How to search multiple fields using ASP A major issue for me when I first started writing in VB Script was constructing the ability to search a table using multiple field input from a form and having the sql statement dynamically built according to the input provided by the user. I have used the method described here hundreds of times it is quick and adaptive. I generally use a frames page for the search, in this way the search is maintained...
5
4155
by: Fran Jakers | last post by:
Hello all, I'm new to all this and I could really use some help. I've searched the web but cannot find an answer. I have an HTML form with 3 radio buttons and a search field that calls a MySQL database using JavaScript to find a product either by Product ID, Description, or Both. Originally, the 'Both' radio button was "checked" but I now want the 'Product ID' button set as the default choice (as you can see from the code below). ...
13
2121
by: jfarthing | last post by:
Hi everyone! I am using the script below to search a db. If the is more than one match in the db, all goes well. But if there is only one match in the db, nothing gets displayed. Any suggestions will be greatly appreciated. Jim #! /usr/bin/perl -w use strict;
0
10781
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information inside an image, hide your complete image as text ,search for a particular image inside a directory, minimize the size of the image. However this is not a new concept, there is a concept called Steganography which enables to conceal your secret...
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10216
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9997
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8873
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3965
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3565
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.