472,805 Members | 908 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,805 software developers and data experts.

Autocomplete with big lookup table

I'm creating a database Winforms application using VCS Express 2005

I have some large lookup tables (may be up to 500000 records) which
contains name and id and are stored in sql server.

I need to create single line combobox style control which:

1. Allows to type first characters in name
2. Auto-completes entered data by using first match
3. Allows to open picklist based by entered data and select name

I tried to use Combobox with lookup table.
I can set combobox autocomplete source to lookup table and autocomplete
window shows matches very well.

Lookup parts table is big, it takes a lot of time to load the
data source.

I think I need virtual combobox control with autocomplete and selection from
list.

Is is not reasonable to load whole table as combobox lookup table during
combobox
creation like ms doc sample recommends.
I have found 2 possibilities:

1. Add some code to combobox events to implement virtual mode. Is this
possible ?

2. Create textbox, selection button and use (virtual?) DataGridView to
emulate virtual dropdown list. In this case I must create UI in code
also.

Which way is better ?
Where to find more information about this ?

Andrus.
Feb 15 '07 #1
5 12537
Hi,

>
I have found 2 possibilities:

1. Add some code to combobox events to implement virtual mode. Is this
possible ?

2. Create textbox, selection button and use (virtual?) DataGridView to
emulate virtual dropdown list. In this case I must create UI in code
also.

Which way is better ?
Where to find more information about this ?
500K rows are WAY too much, you need to look for another way of displaying
the info.
Feb 15 '07 #2
I think what you want to do here is handle the keypress event, and after
there are at least 2 or 3 letters typed, you would use this as a filter in
the WHERE clause of your SQL Statement to return a small matching subset, and
bind this to your control.
There are a number of implementations of this for both Windows Forms and
ASP.NET, you can find them easily with a well-constructed google or live.com
search.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Andrus" wrote:
I'm creating a database Winforms application using VCS Express 2005

I have some large lookup tables (may be up to 500000 records) which
contains name and id and are stored in sql server.

I need to create single line combobox style control which:

1. Allows to type first characters in name
2. Auto-completes entered data by using first match
3. Allows to open picklist based by entered data and select name

I tried to use Combobox with lookup table.
I can set combobox autocomplete source to lookup table and autocomplete
window shows matches very well.

Lookup parts table is big, it takes a lot of time to load the
data source.

I think I need virtual combobox control with autocomplete and selection from
list.

Is is not reasonable to load whole table as combobox lookup table during
combobox
creation like ms doc sample recommends.
I have found 2 possibilities:

1. Add some code to combobox events to implement virtual mode. Is this
possible ?

2. Create textbox, selection button and use (virtual?) DataGridView to
emulate virtual dropdown list. In this case I must create UI in code
also.

Which way is better ?
Where to find more information about this ?

Andrus.
Feb 15 '07 #3
go to the first day of the next month and subtract one.

it's really not that complex
Public Function DaysLeftInMonth(DIn as Date) as Integer
'Dim DOut as Date
'DOut = DateSerial(Month(DIn), 1, Year(Din) - 1
'DaysLeftInMonth = DateDiff(d, DIn, Dout)
DaysLeftInMonth = DateDiff(d, DIn, DateSerial(Month(DIn), 1, Year(Din)
- 1)
End Function
On Feb 15, 11:48 am, "Andrus" <kobrule...@hot.eewrote:
I'm creating a database Winforms application using VCS Express 2005

I have some large lookup tables (may be up to 500000 records) which
contains name and id and are stored in sql server.

I need to create single line combobox style control which:

1. Allows to type first characters in name
2. Auto-completes entered data by using first match
3. Allows to open picklist based by entered data and select name

I tried to use Combobox with lookup table.
I can set combobox autocomplete source to lookup table and autocomplete
window shows matches very well.

Lookup parts table is big, it takes a lot of time to load the
data source.

I think I need virtual combobox control with autocomplete and selection from
list.

Is is not reasonable to load whole table as combobox lookup table during
combobox
creation like ms doc sample recommends.

I have found 2 possibilities:

1. Add some code to combobox events to implement virtual mode. Is this
possible ?

2. Create textbox, selection button and use (virtual?) DataGridView to
emulate virtual dropdown list. In this case I must create UI in code
also.

Which way is better ?
Where to find more information about this ?

Andrus.

Feb 15 '07 #4
500K rows are WAY too much, you need to look for another way of
displaying the info.
Thank you.
I'm not planning to load all data since user actually looks only very small
part of data.

I think I need a simple approach: autocomplete reads first match from sql
server.
Opening picklist shows and reads first 10 matched from server.
Scrolling in pick list reads next 10 records etc.

This works probably fast even without caching.

Do you have anyidea how to implement such combo ?
My major issue is which event I should capture in combobox or how to use
virtual grid for this.
I havent found any such sample.

Andrus
Feb 16 '07 #5
Thank you.

..NET combox has autosuggest feature.
I think I can use this. In this case there is no need to implement
autocomplete in my code.

In thi case I need to capture autosuggest not found event and in this event
read matching row from sql server.

I searched google.com and live.com for a keywords "c# combobox" and looked
for results. I read all combobox arcticles from codeproject.com

Most result describe creating auto-complete and multi-column combobox.

I havent found any which describes creating virtual combobox or similar
control.

Which keywords I should use to search or where to find information about
creating such control ?

Andrus.
"Peter Bromberg [C# MVP]" <pb*******@yahoo.yabbadabbadoo.comwrote in
message news:27**********************************@microsof t.com...
>I think what you want to do here is handle the keypress event, and after
there are at least 2 or 3 letters typed, you would use this as a filter in
the WHERE clause of your SQL Statement to return a small matching subset,
and
bind this to your control.
There are a number of implementations of this for both Windows Forms and
ASP.NET, you can find them easily with a well-constructed google or
live.com
search.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Andrus" wrote:
>I'm creating a database Winforms application using VCS Express 2005

I have some large lookup tables (may be up to 500000 records) which
contains name and id and are stored in sql server.

I need to create single line combobox style control which:

1. Allows to type first characters in name
2. Auto-completes entered data by using first match
3. Allows to open picklist based by entered data and select name

I tried to use Combobox with lookup table.
I can set combobox autocomplete source to lookup table and autocomplete
window shows matches very well.

Lookup parts table is big, it takes a lot of time to load the
data source.

I think I need virtual combobox control with autocomplete and selection
from
list.

Is is not reasonable to load whole table as combobox lookup table during
combobox
creation like ms doc sample recommends.
I have found 2 possibilities:

1. Add some code to combobox events to implement virtual mode. Is this
possible ?

2. Create textbox, selection button and use (virtual?) DataGridView to
emulate virtual dropdown list. In this case I must create UI in code
also.

Which way is better ?
Where to find more information about this ?

Andrus.

Feb 16 '07 #6

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

Similar topics

3
by: Pete | last post by:
I'm currently doing a database that uses comboboxes to look up records in other tables, whether they be lookup tables or otherwise. When a user needs to add an item to one of these tables, the...
3
by: my-wings | last post by:
I've been reading about how evil Lookup fields in tables are, but I've got to be missing something really basic. I know this subject has been covered before, because I've just spent an hour or two...
3
by: google | last post by:
I have a database with four table. In one of the tables, I use about five lookup fields to get populate their dropdown list. I have read that lookup fields are really bad and may cause problems...
0
by: Jim Bancroft | last post by:
I'm having some trouble mixing "AutoComplete" attributes and transactions with my VB .Net components. Right now, I have two classes --a "parent" and "child"-- that inherit from the .Net...
1
by: Bob | last post by:
I am creating a page that does a lookup on a contacts table in my database. What is the best way to have the user type in part of the name and then display those that match? An autocomplete...
8
by: nil | last post by:
Hello all, It's urgent... i want to add autocomplete textbox facility in my application like google. as you type it suggests option to the user..i want the same kind of facility...i know i...
1
by: wkerplunk | last post by:
Below is what I have build with several different languages. It works great but I need help, I am stuck. When you click on an item in the dropdown autocomplete div it does a mousedown function...
1
by: =?Utf-8?B?UmV5?= | last post by:
I have a textbox and linked that with the autocomplete extender I have created the webservice and the WebMethod and returns a ToArray to the textbox. Everything works when I type normal string...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.