RadComboBox for ASP.NET

When is the ExternalCallBackPage needed? Send comments on this topic.
See Also
TroubleShooting > When is the ExternalCallBackPage needed?

Glossary Item Box

For complex load-on-demand scenarios - for example load-on-demand combobox inside an asp:datagrid EditTemplate, you will need to use the ExternalCallBackPage property of Telerik RadComboBox. The callback ItemsRequested event fires only when then combobox is initially visible in the page life-cycle (Page.IsPostBack == false). This is often not the case when the combobox has been added dynamically to the page or when the combo is inside a template that it not initially visible (EditTemplate in asp:datagrid for example). This is where ExternalCallBackPage comes to help.
 
ExternalCallBackPage is a normal ASP.NET aspx page that contains only one instance of Telerik RadComboBox. The ID of the combobox should match the ID of the combobox initiating the request. You can then wire the ItemsRequested event handler of the external combobox and write your custom logic, the same way you would do in the original page. Finally, set the ExternalCallBackPage property of the original combobox to the name of the callback (streamer) page. The path is relative to the current path of the parent page (the streamer page should reside in the same folder).
 
One additional benefit of ExternalCallBackPages is that methods in the original page lifecycle (Page_Init, Page_Load, etc) do not get executed - the execution is directly transferred to the external streamer page.
You can use numerous different instances of Telerik RadComboBox inside your DataGrid.

There are two basic approaches when you have to use ExternalCallBackPage:

  1. Loading items on demand (in the ItemsRequested event handler) while the combobox resides in a user control or is embedded in another control such as GridView, Telerik RadGrid etc.
  2. The combobox is not initially visible on the page and the items are about to be added on demand (in the ItemsRequested event handler). This is often the case when the combobox has been added dynamically to the page or when the combo is inside a template that is not initially visible (EditTemplate in GridView for example).

See live example at:

Combo In Grid

See Also