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

Ajaxrequest only on certain treeview events?

1 Answer 29 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Absolute Data Group
Top achievements
Rank 1
Absolute Data Group asked on 06 Oct 2009, 06:47 AM
I'm not even sure this is possible, but here it goes...

I have a rad splitter with 3 panes in it (A, B and C). Pane "A" gets a treeview loaded into it dynamically, with handlers assigned to it at runtime, etc during the pageload. Pane "B" has a panel in it that loads user controls based on which node in the treeview you click.

I add at runtime the ajax setting to update the panel in pane "B" when the tree is interacted with, like this:

        RadAjaxManager1.AjaxSettings.AddAjaxSetting(Tree, UPanel) 
        RadAjaxManager1.AjaxSettings.AddAjaxSetting(Tree, Tree) 

It's cool and everything works, HOWEVER -

I don't really want to update the Tree every time. I only really want to update it on certain events (like selecting an item from a tree context menu) but not on others (selecting a node), however I do want update the "UPanel" control when I select a node.

How could I implement this? I'm familiar with the RequestStart and RequestEnd handlers of the AjaxManager, but I'm not seeing a clear strategy to get to where I want.

Any suggestions would be appreciated!

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 08 Oct 2009, 08:05 AM
Hello John,

Thank you for the explanation. I would suggest you intercept the OnAjaxSettingCreating event of the ajax manager and change the updated control inside its handler dynamically as demonstrated on this demo:

http://demos.telerik.com/aspnet-ajax/ajax/examples/manager/dynamicajaxsettings/defaultcs.aspx

Thus depending in your custom logic you should be able to modify the second ajax setting which updates the treeview conditionally.

Kind regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Ajax
Asked by
Absolute Data Group
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or