Using large lookup table
-
I'm creating C# MONO/.NET 2 Winforms application. I need to enter part names but store part ids in orders table. I set Combobox Datasource to parts table. Since parts table is very big, it takes a lot of time to load the data source. How to use lookup table when lookup table is large ? Is it possible to use virtual combobox or some other control?
Andrus
-
I'm creating C# MONO/.NET 2 Winforms application. I need to enter part names but store part ids in orders table. I set Combobox Datasource to parts table. Since parts table is very big, it takes a lot of time to load the data source. How to use lookup table when lookup table is large ? Is it possible to use virtual combobox or some other control?
Andrus
Use a hashtable. How big are we talking ?
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
Use a hashtable. How big are we talking ?
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
Thank you. I asked for a WinForms control like which shows first 10 parts whose name starts with entered name. User can scroll and see next or previous 10 part names. In this case combobox should ask next 10 rows from server etc. Total table size is from 100 .. 500000 record depending on the user and it is not reasonable to load it as combobox lookup table during combobox creation like ms doc sample recommends. Hashtable is not UI control and cannot used for this. This should be common requirement. Where to find code which implements this ?
Andrus
-
Thank you. I asked for a WinForms control like which shows first 10 parts whose name starts with entered name. User can scroll and see next or previous 10 part names. In this case combobox should ask next 10 rows from server etc. Total table size is from 100 .. 500000 record depending on the user and it is not reasonable to load it as combobox lookup table during combobox creation like ms doc sample recommends. Hashtable is not UI control and cannot used for this. This should be common requirement. Where to find code which implements this ?
Andrus
Ah, OK. I thought you wanted to look up values and then display them.
AndrusM wrote:
This should be common requirement.
I don't think it is. I know that comboboxes offer auto complete, perhaps you can find something there ? I'm not sure if it works with a callback, or just a data source.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
I'm creating C# MONO/.NET 2 Winforms application. I need to enter part names but store part ids in orders table. I set Combobox Datasource to parts table. Since parts table is very big, it takes a lot of time to load the data source. How to use lookup table when lookup table is large ? Is it possible to use virtual combobox or some other control?
Andrus
To me it sounds like you should have a BackgroundWorker that will load the data in small pieces and then add them (when possible, or by request) to the combo box. I am wondering weather you really need a combo box though.. Wouldn't a ListView be better?
Internet - the worlds biggest dictionary
-
Ah, OK. I thought you wanted to look up values and then display them.
AndrusM wrote:
This should be common requirement.
I don't think it is. I know that comboboxes offer auto complete, perhaps you can find something there ? I'm not sure if it works with a callback, or just a data source.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
To me it sounds like you should have a BackgroundWorker that will load the data in small pieces and then add them (when possible, or by request) to the combo box. I am wondering weather you really need a combo box though.. Wouldn't a ListView be better?
Internet - the worlds biggest dictionary
Backgroundworker is too complicated for this task. Usually user type first characters of name and want to see 10 matching character. It is best that control reads data only from server when user requestes autocomplete or opens dropdown menu. ListView takes a lot of screen space. I need singe-line width field, autocomplete and selection from dropdown table. I think that combobox nearest to those requirements
Andrus