This is a migrated thread and some comments may be shown as answers.

RadAjaxLoadingPanel not showing when using RadTreeView inside ItemTemplate of RadComboBox

1 Answer 77 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Rob van Baast
Top achievements
Rank 1
Rob van Baast asked on 31 Jan 2011, 04:36 PM
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">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadAjaxManager runat="server" ID="radAjaxManager">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="rcbOrganisationUnits">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="lblSelection" LoadingPanelID="loadingPanel1" />
            </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadComboBox1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="lblSelection" LoadingPanelID="loadingPanel1" />
            </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="loadingPanel1" runat="server" IsSticky="true" style="position:absolute; top:0px; left:0px; height:100%; width:100%;background-color:Red;">
        </telerik:RadAjaxLoadingPanel>
     
     
        <telerik:RadComboBox ID="rcbOrganisationUnits" runat="server" AutoPostBack="false"
        AllowCustomText="false" EmptyMessage="< Select item >" DataTextField="Description"  Height="100">
    <ItemTemplate>
        <telerik:RadTreeView ID="rtvOrganisationUnit" runat="server" 
            DataTextField="Description"
            DataValueField="Id"
            DataFieldID="Id"
            DataFieldParentID="ParentId"
            OnNodeClick="rtv_NodeClick">
            <DataBindings>
                 
            </DataBindings>
        </telerik:RadTreeView>
    </ItemTemplate>
    <Items>
        <telerik:RadComboBoxItem />
    </Items>
</telerik:RadComboBox>
 
        <telerik:RadComboBox ID="RadComboBox1" runat="server"
        AllowCustomText="false" EmptyMessage="< Select item >" AutoPostBack="true"  Height="100">
        <Items>
            <telerik:RadComboBoxItem Text="One" runat="server" />
            <telerik:RadComboBoxItem Text="Two" runat="server" />
            <telerik:RadComboBoxItem Text="Three" runat="server" />
        </Items>
        </telerik:RadComboBox>
 
 
<asp:Label ID="lblSelection" Text="nothing selected" runat="server" />
 
 
     
    </div>
    </form>
</body>
</html>

1 Answer, 1 is accepted

Sort by
0
Rob van Baast
Top achievements
Rank 1
answered on 01 Feb 2011, 09:14 AM
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);
                    }
                }
Tags
Ajax
Asked by
Rob van Baast
Top achievements
Rank 1
Answers by
Rob van Baast
Top achievements
Rank 1
Share this question
or