2

I have a RadComboBox which is being populated by a large number of items, atleast 50K.

<telerik:radcombobox id="cbSupplier" runat="server" width="85%" enableitemcaching="true"
         enableloadondemand="false" filter="Contains"
         onclientkeypressing="HandleKeyPress">
</telerik:radcombobox>

<script type="text/javascript">

    function HandleKeyPress(sender, e) {
        if (!sender.get_dropDownVisible()) 
            sender.showDropDown(); 
    }

</script>

This javascript HandleKeyPress function is searching in the combobox for input text. The problem is that the searching is very slow. It looks like when I enter a key, the browser halts for 5 to 6 seconds and then it search in the combobox.

Is there any solution to make searching a little faster in the RadComboBox?

Usman Khalid
  • 2,872
  • 8
  • 33
  • 63

2 Answers2

2

I don't think you need the JavaScript at all, and if you remove those calls and let the Telerik control do its internal functions on its own, you might see a minor boost. I tried this with about 1 thousand items and it seemed a bit quicker by adding ShowDropDownOnTextboxClick="true":

<telerik:RadComboBox ID="cbSupplier" runat="server" width="85%" 
    EnableItemCaching="true" EnableLoadOnDemand="false" Filter="Contains"
    ShowDropDownOnTextboxClick="true">
</telerik:radcombobox>
DanM7
  • 2,101
  • 3
  • 25
  • 45
0

If it has to search through 50K items, then it will indeed be slow. It's not magic - it has to examine each one until it finds a match.

Also, if I was presented with a page with a combo box containing more than 500 entries I would not be impressed. If the combo has 100 or more - let alone 50k - I would probably leave the site. It's not usable.

I suggest you rethink your page design.

simon at rcl
  • 6,772
  • 1
  • 15
  • 22