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

Configuring RadAjaxManager Programatically

5 Answers 131 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
ADe
Top achievements
Rank 1
ADe asked on 20 Jul 2008, 11:38 AM

I'm having a problem doing this (as in no code errors but still get postbacks).

I populate a RadTreeView programatically and when a node is clicked I want Ajax to kick in and change the ContentURL of a RadPane.

Can anyone see what I might be doing wrong in the code below (in green),

protected void PopulateNavSites(RadTreeNode LASitesNode)     
        {     
            LASitesNode.Nodes.Clear();     
    
            DataSet dsSites = Master.Services.Site.getAllSitesByLaName(Master.User.Username, LASitesNode.Value);     
            if (dsSites.Tables[0] != null)     
            {     
                foreach (DataRow Row in dsSites.Tables[0].Rows)     
                {     
                    RadTreeNode Node = new RadTreeNode();     
                    Node.Text = Row["siteName"].ToString();     
                    Node.Value = Row["siteID"].ToString();     
                    Node.Attributes.Add("nodeType", "Site");     
                    PopulateNavSiteTools(Node);     
                    LASitesNode.Nodes.Add(Node);     
                    radAjaxManagerProxy.AjaxSettings.AddAjaxSetting(Node, radPaneContent, Master.radLoadingPanel);     
                }     
            }     
        } 

 

 

5 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 21 Jul 2008, 06:57 AM
Hi ADe,

RadSlidingPane, RadPane, and RadSplitBar controls can not be updated directly with an Ajax Manager control.
When you want to update the content of a RadPane (or RadSlidingPane) control, just add an asp:Panel control (or any other container control that runs on the server) inside the pane and update the panel instead the RadPane (or RadSlidingPane).

Regards,
Maria Ilieva
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
ADe
Top achievements
Rank 1
answered on 21 Jul 2008, 02:33 PM
Thanks for the reply but it still ignores the command and just does a post back.
0
Maria Ilieva
Telerik team
answered on 21 Jul 2008, 02:54 PM
Hello ADe,

Try also to add the whole TreeView control as Ajax initiator, instead of single node.

Regards,
Maria Ilieva
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
ADe
Top achievements
Rank 1
answered on 22 Jul 2008, 09:06 AM
I haven't been able to try this as yet but it isn't really what I want to do as my TreeView has a LOT of nodes in it and the ajax performance was really slow so I wanted to limit the AJAXing to be specifically on the nodes that require it and leave the others as they are.
0
Maria Ilieva
Telerik team
answered on 22 Jul 2008, 01:24 PM
Hi ADe,

I realty understand your requirements,  adding single node in the Ajax settings is not supported scenario. As you are using  the RadTreeView as Ajax initiator (not updated control), this step shouldn't drastically decrease the performance of your project. Test this approach and let us know how it goes.

Sincerely yours,
Maria Ilieva
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Ajax
Asked by
ADe
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
ADe
Top achievements
Rank 1
Share this question
or