Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
UltraComboEditor performance
posted

I have a Winforms app in which there is a "client" drop-down implemented as a UltraComboEditor. For most users, who are assigned to a specific office, this will have a few dozen entries, and everything is fine. For highly priviledged users, such as those working at the company HQ, every client in the system is available, however. This is on the order of tens of thousands of entries. If I bind this list to a plain Windows.Forms.ComboBox, it remains responsive and usable. The performance of an UltraComboEditor bound to the same list is unacceptable, however. Clicking the drop-down arrow results in a 5-10 second delay, and scrolling is unusable.

Is there anything that I can do to help the performance of the drop-down. Changing to another control isn't really an option, since the highly-priviledged users are a definite minority, and I don't want to break the application for the vast majority of users in order to satisfy just a few. I can't get the plain windows forms combo to match the surrounding UltraComboEditors style-wise, either.

I have tried binding the drop-downs to a List<KeyValuePair<int, string>> thinking that smaller objects might help, but it has made no appreciable difference in the performance of the control. Here is a snippet in which I bind both drop-downs.

            clientComboBox.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.Suggest;
            clientComboBox.AutoSuggestFilterMode = AutoSuggestFilterMode.Contains;
            clientComboBox.DisplayMember = "Value";
            clientComboBox.ValueMember = "Key";
            clientComboBox.LimitToList = true;

            comboBox1.BackColor = clientComboBox.BackColor;
            comboBox1.FlatStyle = FlatStyle.Flat;
            comboBox1.AutoCompleteMode = AutoCompleteMode.Suggest;
            comboBox1.DisplayMember = "Value";
            comboBox1.ValueMember = "Key";
            comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;

            var list = clientLevelSummaries.ToList();
            list.Insert(0, new KeyValuePair<int, string>(0, " "));
            clientComboBox.DataSource = list;
            comboBox1.DataSource = list;

Is there anything left to try, other than having one control that looks out of place?  

Parents
  • 469350
    Offline posted

    Hi,

    In order to determine if there is any way around it, we first need to find out why it's so slow.

    The most obvious reason why dropping down the list would be slow is that the Combo is searching the list trying to find an item on the list that matches what's currently in the edit portion. If there is no matching item, then that means the combo has to search the entire list. So, if your combo editor is going to start off blank or null, you might want to make sure that your list contains a null value (preferably at the top) so that the search is fast.

    Regarding the scrolling, there are too many unknowns here for me to guess why that part is slow.

    Are you binding the combo or populating it in code?

    Are you using Images for the items on your list?

    What version of the controls are you using?

    Can you duplicate the issues you are experiencing in a small sample project?

    Displaying that many items on a single combo is not really very useful to a user, anyway, is it? I mean, no human could possibly scroll through such a list to any useful purpose, anyway. Perhaps you should implement some sort of filtering where you only bring back a certain portion of the rows based on a query?

Reply Children