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

Navigate with RadTreeView

1 Answer 99 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Josh Powell
Top achievements
Rank 1
Josh Powell asked on 30 Apr 2010, 03:45 PM
I have a MasterPage with a RadTreeView that I would like to use to navigate through a site by updating an ajaxed ContentPlaceHolder.  I have a regular asp:Panel wrapping a ContentPlaceHolder as is suggested but I'm still getting a full postback.  The ajax seems to kick off and Loading Panels show up, but they disappear well before the content is updated in a full postback.

I originally tried using the NavigateURL attribute of the RadTreeNode but it wouldn't initiate any Ajax at all, so instead I am tying into the OnNodeClick event and doing a RadAjaxManager.Redirect() call from there.  Any thoughts on why the Master is still posting back instead of just the content?

<?xml version="1.0" encoding="utf-8" ?> 
<Tree > 
 <Node PostBack="false" Text="Project Data" > 
    <Node Text="SingleProject Data" Expanded="False" PostBack="false" > 
      <Node Text="Home" NavigateURL="#" Value="Home.aspx"></Node> 
      <Node PostBack="false" Text="Project Management" > 
        <Node Text="Configuration" NavigateURL="#" Value="Configuration.aspx"></Node> 
      </Node> 
      <Node PostBack="false" Text="Project Detail"
        <Node Text="Shipping" NavigateURL="#" Value="Shipping.aspx" /> 
        <Node Text="Building" NavigateURL="#" Value="Building.aspx" /> 
       </Node> 
    </Node> 
  </Node> 
</Tree> 
 
 
 protected void NodeClick(object sender, RadTreeNodeEventArgs e) 
        { 
            if (e.Node.NavigateUrl == "#"
                RadAjaxManager1.Redirect(e.Node.Value); 
        } 
<form id="form1" runat="server"
    <telerik:RadScriptManager ID="ScriptManager1" runat="server" EnableTheming="True"
    </telerik:RadScriptManager> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadTreeView1"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="pHeaderAjax" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                    <telerik:AjaxUpdatedControl ControlID="pContentAjax" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 05 May 2010, 03:23 PM
Hello Josh,

When navigating through the TreeView, are you redirecting to another page?
Note that ajax is used to update particular page content on the same page only. For a new page to be loaded a full postback should be performed.

Sincerely yours,
Iana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Ajax
Asked by
Josh Powell
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or