stefcl wrote:
Hello,
Here's how I do it...
There's a form in my app which contains about 15 combo boxes. The form allows the user to edit entities so the combo boxes are essentially a way to select foreign key values without having to type their identifier.
Each combobox has its own datasource. When the form is shown, I don't fill all these datasources with all their possible values but only the values that are currently displayed by the comboboxes.
When the user opens the combobox to select a value, the first 50 rows are fetched JIT from the database and displayed (it is barely noticeable). If he starts typing "A", I'll fetch the 20 first records that starts with A to enable autocomplete.
If the user has no idea which value he should type, he can press F4 to open a select dialog where he can navigate and filter the records according to different rules (what SAP does).
Here are the benefits:
-A datasource is filled only if its content is actually required. In this case: only when the user is trying to change the value of your bound combobox controls.
-The list of value displayed in the combobox is almost never out of date.
hmmm.. this sounds interesting. Let me see if I get it right;
what you are saying that the you are assuming the user would do one of 3 things when dealing with a combo-box:
1- user types in data. If the user types in "K" you would retrieve data starting with "K" and then when user types in "U" you retrieve data starting with "KU".
I dont know how fast this would perform but I will sure to try it.
2- user opens the combo list to select a value. In this case you only retrieve the first 50 records. I guess it makes sense here to provide some sort of UI to facilitate paging through rest of data. Also here you are saying that retrieving those 50 records should not be a big performance hit. I guess that makes sense in a WinForms app but I will sure also to try this
3- user needs to search for the value he wants to select from the combo. Here the user F4 to bring up a select dialog. This select dialog should properly facilitate searching/filtering for the data.
Did you extend the combo-box control to bake this behavior in the control or just handled all this per-control. From what I understand so far, your design fits nicely with LLBL's fiterBuckets but I think it will be a headache to implement a UI for the paging functionality in step 2.
I will start applying this to practice and see how it dishes out. Its interesting that you say SAP do this as we are starting a SAP implementation in our company next year. I will sure to keep my eyes open for those SAP combos.
Thanks for the input..