Click here to Skip to main content
16,017,907 members
Please Sign up or sign in to vote.
3.67/5 (2 votes)
See more:
Hi All,

I am working on a internal project and need to load or suggest data from database. I have to do this using Text box only (not with Combo box) As i cannot pre load data and attach as data in DB is very high in number as it is 1.7 million rows. I need to do it on Text_Changed of text box Dynamically. However, windows default (Text Box Auto Complete) is helping me with this. But the width of loading suggestions are restricting to Text box length. I need this list width should be at least 600 as data from database is long of 200 characters. I need to show at least 100 chars.

I am using

C# winforms UI.
.net 2.0 framework.
SQL Compact DB 4.0

Looking forward for help from beloved coders.

What I have tried:

I have tried Windows default text box with Auto Complete. But, Length is restricting to text box length.
Posted
Updated 6-Jun-16 2:34am
Comments
Afzaal Ahmad Zeeshan 4-Jun-16 7:32am    
I wrote a similar article for this, have a look, does this help?

1 solution

Hi There,
I'm not sure I fully understand your question but I think I have done something similar. Maybe you can adapt it to your needs.

I based my solution on this example
Search As You Type in C#

When I type in the search text box a data grid below lists all the matching items the more you type the fewer matches there are in the data grid. I used this to sort through 10,000+ contact names and addresses to find and select the one I want. Kind of like how Google search works. The code is surprisingly simple and very quick.

Good Luck and I hope this idea helps you.
David
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900