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

Update RadAjaxPanel from outside RadTreeView:s OnNodeClick event handler, not causing full page reload

1 Answer 112 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Anders asked on 21 Mar 2017, 10:05 AM

I want to update a RadAjaxPanel, when I have been clicking a RadMenuItem of a RadTreeView.

That treeview is not inside the RadAjaxPanel but on the same page as it.

If I add a OnNodeClick handler to the RadTreeView and add a event handler in code behind, then clicking a RadMenuItem of the treeview will cause a postback and the whole page will reload.

Instead, I want the RadAjaxPanel to reload so I can bind a grid in it.

How can I do that? I will not move the treeview inside the ajax panel.

1 Answer, 1 is accepted

Sort by
Marin Bratanov
Telerik team
answered on 24 Mar 2017, 09:32 AM

Hello Ingemar,

You can do this via a RadAjaxManager:

For example

<telerik:RadAjaxManager runat="server" ID="ram1" DefaultLoadingPanelID="ralp1">
        <telerik:AjaxSetting AjaxControlID="rtv1">
                <telerik:AjaxUpdatedControl ControlID="Panel1" />
                <telerik:AjaxUpdatedControl ControlID="rtv1" />
<telerik:RadAjaxLoadingPanel runat="server" ID="ralp1" Skin="Black"></telerik:RadAjaxLoadingPanel>
    <asp:Panel ID="Panel1" runat="server">
        This Panel control used to be a RadAjaxPanel, replace it with the simple asp:Panel
        <br />
        <br />
        <asp:Label ID="Label1" Text="text" runat="server" />
    <telerik:RadTreeView runat="server" ID="rtv1" OnNodeClick="rtv1_NodeClick">
            <telerik:RadTreeNode Text="node 1">
                    <telerik:RadTreeNode Text="node 1 1"></telerik:RadTreeNode>
                    <telerik:RadTreeNode Text="node 1 2"></telerik:RadTreeNode>
            <telerik:RadTreeNode Text="node 2"></telerik:RadTreeNode>

protected void rtv1_NodeClick(object sender, RadTreeNodeEventArgs e)
    System.Threading.Thread.Sleep(2000);//simulate network delay


Marin Bratanov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Asked by
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question