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

TreeView with Ajax EnableHistory="True" doesn't work in IE

1 Answer 31 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
dlamprey
Top achievements
Rank 2
dlamprey asked on 02 Jun 2010, 04:48 PM
IE cannot resolve the URL for a server side callback when collapsing a node if the URL contains a hash symbol (#).

Since the page ScriptManager tracks history points by appending a hash code to the page URL, the treeview will fail to load when using ajax history (back button support). I have the same issue as well with RadScriptManager.

Works correctly in Firefox. Using release 2009.3.1314.35.

Sample project

1 Answer, 1 is accepted

Sort by
0
Nikolay Tsenkov
Telerik team
answered on 08 Jun 2010, 04:19 PM
Hello dlamprey,

SInce this is IE problem I can only provide you with a workaround.

You basically need to change the value of the form's action, just before and after request for nodes (nodeExpand).
Here is the markup of the tree:
<telerik:RadTreeView runat="server" ID="Tree1" OnClientNodeExpanding="nodeExpanding" OnClientNodeExpanded="nodeExpanded">
</telerik:RadTreeView>

And here is the JavaScript doing the whole work:
var initialFormAction=document.form1.action;
var currentFormAction=initialFormAction;
 
function nodeExpanding(sender,args)
{
    currentFormAction=document.form1.action;
    document.form1.action=initialFormAction;
}
 
function nodeExpanded(sender,args)
{
    document.form1.action=currentFormAction;
}

This way you are changing the action of the form for the period of time that it's used by the expand by server-side callback request only.

Hope this is going to help you!


Regards,
Nikolay Tsenkov
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
TreeView
Asked by
dlamprey
Top achievements
Rank 2
Answers by
Nikolay Tsenkov
Telerik team
Share this question
or