RadComboBox for ASP.NET

Optimizing the combobox speed. Send comments on this topic.
See Also
TroubleShooting > Optimizing the combobox speed.

Glossary Item Box

The best approach to optimize the performance speed of Telerik RadComboBox when using huge amount of items is using the load-on-demand feature.  The load-on-demand mechanism loads the items only when the user types or clicks in the field or the drop-arrow image. You can also load the items only upon clicking on the drop arrow. To do this you should set the ShowDropDownOnTextboxClick property to false. For even faster load of the page, you can leave the combobox empty when it is first rendered on the page. Items will be added as soon as the user clicks in the input field, the drop-arrow image or types some text into the input field. In other words, you can add the items only in the ItemsRequested event handler.

When using the load-on-demand mechanism you should:

  1. Set the EnableLoadOnDemand property to true
  2. Subscribe to the ItemsRequested event and add the items there

Example:

ASPX Copy Code
<rad:RadComboBox
           
ID="RadComboBox1"
           
runat="server"
           
EnableLoadOnDemand="True"
           
OnItemsRequested="RadComboBox1_ItemsRequested">
</
rad:RadComboBox>
C# Copy Code
protected void RadComboBox1_ItemsRequested(object o, Telerik.WebControls.RadComboBoxItemsRequestedEventArgs e)
   {
       RadComboBox1.Items.Add(
new RadComboBoxItem("Item1", "1"));
       RadComboBox1.Items.Add(
new RadComboBoxItem("Item2", "2"));
       RadComboBox1.Items.Add(
new RadComboBoxItem("Item3", "3"));
   }
VB.NET Copy Code
Protected Sub RadComboBox1_ItemsRequested(o As Object, e As Telerik.WebControls.RadComboBoxItemsRequestedEventArgs)
   RadComboBox1.Items.Add(New RadComboBoxItem("Item1", "1"))
   RadComboBox1.Items.Add(New RadComboBoxItem("Item2", "2"))
   RadComboBox1.Items.Add(New RadComboBoxItem("Item3", "3"))
End Sub 'RadComboBox1_ItemsRequested

Furthermore, you can use the ShowMoreResultsBox property to load more items when the ShowMoreReultsBox is clicked. When clicking the ShowMoreResultsBox a callback is fired and the ItemsRequested event gets fired, too. This allows you to add more items to the combobox Items collection.

When you load the combobox items from heavy database, you can cache the data source so that additional calls are avoided. This will make the combobox event faster.

A sample project can be seen at:
Autocomplete callback from Dictionary

See Also

Telerik RadComboBox Server-Side
Load Items On Demand