RadComboBox for ASP.NET

Combobox callback is slow Send comments on this topic.
TroubleShooting > Combobox callback is slow

Glossary Item Box

Imagine the following approach:

  • Combobox items are added in the Page_Load event. The items are added from a huge datasource. The code is placed in  
    if (!Page.IsPostBack)
    {
      
    //Initialization code
    }
    Telerik RadComboBox is in a callback mode - the items are also added in the ItemsRequested event of the combobox.
  • The code in the if (!Page.IsPostBack) block is executed upon each postback. This is what makes the combobox performance slow.

Telerik RadComboBox performs a "light" callback to the server - no ViewState information is sent to the server and the Page.IsPostBack property is set to False when the combobox is in a callback mode.

In addition, the Page_Load method is called before the ItemsRequested event. Therefore, all page initialization code is fired, too.
 
To avoid re-executing of the code in the Page_Load event, you should check for both Page.IsPostBack and RadComboBox.IsCallBack:

Example:

  Copy Code
...
protected void Page_Load(object sender, EventArgs e)
{
   
if (!Page.IsPostBack && !RadComboBox.IsCallBack)
   {
      
//Initialization code
   }
}