Hi Guy,
I have a large datasource with more than 10.000 row for autocomplete using in UltraCombo, the performance is very poor.
Could we customize the searching for autocomplete to show only top 20 result in datasource?
Thanks
Hello,
Thank you for getting back to me.
I am glad that you managed to achieve your requirement. I did some additional testing with the sample previously attached in this case. On my side it seems that there is no significant delay with the autosuggest for combo with 100 000 items to look in for the suggestions. Here is a small gif illustrating the behavior.
Please let me know if you need any further assistance with this matter.
Sincerely,
Teodosia Hristodorova
Associate Software Developer
Hi guy,
Thanks for your replay. I have a data-source with more than 10.000 rows to using auto complete with ultracombo, the main issue is the performance of suggestion, e.g. when you type a text in ultracombox, you will see the delay when typing.
But my solution is re-assign data-source when text changed in combobox.
Thanks,
The WinGrid Performance Guide could be found here.
I have been looking into your question. I can suggest taking a look at the WinGrid Performance Guide. UltraCombo is derived from the same base class as UltraGrid, so many of the same performance issues apply.
I tried to reproduce the described behavior and generate a DataTable with 10 000 rows as DataSource of UltraCombo, however, I didn't notice any performance issue. Could you please provide more details regarding your issue? Do you have performance issues when you try to load your 100 000 items in the combo, or when you try to dropdown the list with items for the first time or maybe you have performance issues when you are using AutoCompleteMode?
Additionally, in order to show only the top 20 filtered rows, my suggestion is to handle the TextChanged event and after that, to restore them you can handle the AfterCloseUp event.
private void ultraCombo1_TextChanged(object sender, EventArgs e) { //get filtered rows var rows = (sender as UltraCombo).Rows.GetFilteredInNonGroupByRows(); for (int i = 0; i < rows.Length; i++) { if((sender as UltraCombo).Text == "") //if the text box is empty remove all filters and show all rows { rows[i].Hidden = false; } else { if (i < 20) { rows[i].Hidden = false; } else { rows[i].Hidden = true; } } } } //restore all rows in order to be able to select different value private void ultraCombo1_AfterCloseUp(object sender, EventArgs e) { var rows = (sender as UltraCombo).Rows; foreach (var _row in rows) { _row.Hidden = false; } }
If this is not an accurate demonstration of what you are trying to achieve please feel free to provide your own sample. Remove any external dependencies and code that is not directly related to the issue, zip your application and attach it in this case.
Having a working sample on my side, which I can debug, is going to be very helpful in finding the root cause of this behavior.
Thank you for your cooperation.