RadAjaxLoadingPanel not showing when using RadTreeView inside ItemTemplate of RadComboBox

2 posts, 0 answers
  1. Rob van Baast
    Rob van Baast avatar
    2 posts
    Member since:
    Sep 2009

    Posted 31 Jan 2011 Link to this post

    Hi All,

    I am trying to get a RadLoadingPanel to show up after the selected item is changed in a RadComboBox with a RadTreeView inside it's itemtemplate.
    I created a small sample project which illustrates my problem. I added the code below.

    There are 2 RadComboBoxes on the webform. The first one contains the RadTreeView as items, the second one just contains plain old items.
    The RadLoadingPanel does show up for the second ComboBox but it won't appear for the first.

    Could anybody tell me what I am missing ?

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="RadComboBoxTreeViewTest._Default" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <form id="form1" runat="server">
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <telerik:RadAjaxManager runat="server" ID="radAjaxManager">
                <telerik:AjaxSetting AjaxControlID="rcbOrganisationUnits">
                    <telerik:AjaxUpdatedControl ControlID="lblSelection" LoadingPanelID="loadingPanel1" />
                <telerik:AjaxSetting AjaxControlID="RadComboBox1">
                    <telerik:AjaxUpdatedControl ControlID="lblSelection" LoadingPanelID="loadingPanel1" />
            <telerik:RadAjaxLoadingPanel ID="loadingPanel1" runat="server" IsSticky="true" style="position:absolute; top:0px; left:0px; height:100%; width:100%;background-color:Red;">
            <telerik:RadComboBox ID="rcbOrganisationUnits" runat="server" AutoPostBack="false"
            AllowCustomText="false" EmptyMessage="< Select item >" DataTextField="Description"  Height="100">
            <telerik:RadTreeView ID="rtvOrganisationUnit" runat="server" 
            <telerik:RadComboBoxItem />
            <telerik:RadComboBox ID="RadComboBox1" runat="server"
            AllowCustomText="false" EmptyMessage="< Select item >" AutoPostBack="true"  Height="100">
                <telerik:RadComboBoxItem Text="One" runat="server" />
                <telerik:RadComboBoxItem Text="Two" runat="server" />
                <telerik:RadComboBoxItem Text="Three" runat="server" />
    <asp:Label ID="lblSelection" Text="nothing selected" runat="server" />

  2. Rob van Baast
    Rob van Baast avatar
    2 posts
    Member since:
    Sep 2009

    Posted 01 Feb 2011 Link to this post

    I figured it out.
    I needed to add each treeview control to the radajaxmanager like this

    foreach (RadComboBoxItem rcbItem in rcb.Items)
                        RadTreeView rtv = rcbItem.FindControl("rtvProducten") as RadTreeView;
                        if (rtv != null)
                            RadAjaxManager1.AjaxSettings.AddAjaxSetting(rtv, panel1, loadingPanel1);
                            RadAjaxManager1.AjaxSettings.AddAjaxSetting(rtv, rcb);
Back to Top