Hello,
I'm trying to refresh RadTreeView using AjaxRequestWithTarget() call from javascript, however it does not refresh the tree. The javascript:
| function RefreshTreeView() |
| { |
| var ajaxManager = <%= AjaxManager.ClientID %>; |
|
| ajaxManager.AjaxRequestWithTarget('<%= TreeView.UniqueID %>', ''); |
| } |
The RefreshTreeView() function is being called from a ScriptManager.RegisterStartupScript inside an ajax hidden updatepanel. This happens when I close a RadDock object. I copied this script from the RadDock MyPortal example, except that I added the RefreshTreeView(). The intention is to remove a node from the tree when a dock object is closed.
The script is as follow:
| ScriptManager.RegisterStartupScript( |
| UpdatePanel, |
| this.GetType(), |
| "RemoveDock", |
| string.Format(@"function _removeDock() |
| {{ |
| Sys.Application.remove_load(_removeDock); |
| RefreshTreeView(); |
| $find('{0}').undock(); |
| $get('{1}').appendChild($get('{0}')); |
| $find('{0}').doPostBack('DockPositionChanged'); |
| }}; |
| Sys.Application.add_load(_removeDock);", |
| ((RadDock)sender).ClientID, UpdatePanel.ClientID), |
| true); |
| |
Please help, anyone?
Thanks
-H