RadCombobox AJAX functionality issues

I'm having a issue with the RadCombobox, I'd like to change the state of other controls on the page based on the text that is in the RadCombobox. I'm trying to use the RadComboBox ItemsRequested event to do this, but it's not working. I submitted a support case and got a very good answer, I'm going to blog it here so that I can easily find it in the future. 

 

Related Articles

... and you 'll find more on the Telerik ASPNET Menu

From Telerik support:

The behavior you're experiencing is expected due to how the RadComboBox ItemsRequested event works. The ItemsRequested event is triggered by an internal AJAX callback used exclusively for loading items on demand into the RadComboBox. This callback updates only the ComboBox items; it does not update or refresh other controls on the page, even if they are inside a RadAjaxPanel or RadAjaxManager. Changes to controls like lnkNewCustomer or txtTime inside the ItemsRequested handler will not reflect on the client, because the partial update is limited to the ComboBox itself.

Why This Happens

The ItemsRequested event uses a dedicated internal AJAX callback mechanism designed exclusively for loading items on demand. This callback:

  • Updates only the ComboBox items
  • Does not refresh other controls on the page
  • Ignores changes made to controls like lnkNewCustomer or txtTime
  • Cannot be intercepted by RadAjaxPanel or RadAjaxManager

This is by design to keep the load-on-demand operation lightweight and efficient.

Solution Options

Option 1: Client-Side Update with OnClientItemsRequested

Use the client-side OnClientItemsRequested event to update controls via JavaScript after items load:

<telerik:RadComboBox ID="cboCustomer" runat="server"
    Width="500px"
    RenderMode="Lightweight"
    AllowCustomText="true"
    AutoPostBack="true"
    DataTextField="custname"
    DataValueField="custnmbr"
    EnableAutomaticLoadOnDemand="true"
    ItemsPerRequest="25"
    OnClientItemsRequested="onItemsRequested">
</telerik:RadComboBox>
 
<script type="text/javascript">
    function onItemsRequested(sender, eventArgs) {
        // Update LinkButton styling
        var lnkNewCustomer = document.getElementById("<%= lnkNewCustomer.ClientID %>");
        if (lnkNewCustomer) {
            lnkNewCustomer.style.color = "black";
            lnkNewCustomer.style.pointerEvents = "auto";
        }
 
        // Update RadTextBox
        var txtTime = $find("<%= txtTime.ClientID %>");
        if (txtTime) {
            txtTime.set_value(new Date().toLocaleString());
        }
    }
</script>

 

Option 2: Trigger a Separate AJAX Postback

Use the client-side event to trigger a hidden button that initiates a proper AJAX postback:

<!-- Add a hidden button inside your RadAjaxPanel -->
<asp:Button runat="server" ID="btnHiddenUpdate" style="display:none" />
 
<telerik:RadComboBox ID="cboCustomer" runat="server"
    EnableAutomaticLoadOnDemand="true"
    OnClientItemsRequested="triggerServerUpdate">
</telerik:RadComboBox>
 
<script type="text/javascript">
    function triggerServerUpdate(sender, eventArgs) {
        // Trigger AJAX postback after items are loaded
        __doPostBack('<%= btnHiddenUpdate.UniqueID %>', '');
    }
</script>
 

Server-side handler (VB.NET):

Private Sub btnHiddenUpdate_Click(sender As Object, e As EventArgs) Handles btnHiddenUpdate.Click
    lnkNewCustomer.Enabled = True
    lnkNewCustomer.ForeColor = System.Drawing.Color.Black
    txtTime.Text = String.Format("{0:MM/dd/yyyy hh:ss:fff}", Now)
End Sub
 

Option 3: Use Server-Side Mode (Disable Load-On-Demand)

If updating other controls is critical, disable load-on-demand and let RadAjaxPanel handle all updates:

<telerik:RadComboBox ID="cboCustomer" runat="server"
    Width="500px"
    AllowCustomText="true"
    AutoPostBack="true"
    DataTextField="custname"
    DataValueField="custnmbr"
    EnableAutomaticLoadOnDemand="false"
    Filter="Contains">
</telerik:RadComboBox>

Then use TextChanged or SelectedIndexChanged events (which already work) to update controls.

Recommended Approach

Scenario

Recommended Option

Simple UI updates (colors, text)

Option 1 - Client-side JavaScript

Complex server-side logic needed

Option 2 - Hidden button AJAX postback

Small dataset, performance not critical

Option 3 - Disable load-on-demand

Summary

The ItemsRequested event cannot update other controls via server-side code due to its dedicated callback mechanism. Use client-side scripting (OnClientItemsRequested) or trigger a separate AJAX postback to achieve the desired behavior.


RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences