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

[Solved] Using Treeview with jquery 1.4.1

2 Answers 59 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dannie F
Top achievements
Rank 1
Dannie F asked on 30 Apr 2010, 02:58 AM
Currently we are using  jquery 1.4.1 in our application and this is referenced in the master page.

When I add this line  <%= Html.Telerik().ScriptRegistrar() %> at the bottom of the page, my tree view works fine with the ajax binding.

However script registrar outputs the following:
<script type="text/javascript" src="/Scripts/2010.1.309/jquery-1.4.2.min.js"></script> 
<script type="text/javascript" src="/Scripts/2010.1.309/telerik.common.min.js"></script> 
<script type="text/javascript" src="/Scripts/2010.1.309/telerik.treeview.min.js"></script> 
<script type="text/javascript"
//<![CDATA[ 
jQuery(document).ready(function(){ 
jQuery('#regionsTreeView').tTreeView({ajax:{"selectUrl":"/Job/AjaxGetTreeViewModel"}});}); 
//]]> 
</script> 

This cause certain other elements of my page to break, which I assume is caused by the references to different versions of jQuery, since the page is OK when I remove the Telerik Script Registrar.

I thought that including the following would solve the problem, but the treeview no longer does the on-demand ajax binding if I don't include telerik's reference to jQuery 1.4.2

 <%= Html.Telerik().ScriptRegistrar().jQuery(true) %>

Does the treeview work with jQuery 1.4.1? How can I get around this problem? Any help would be greatly appreciated.

Thanks

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 30 Apr 2010, 07:46 AM
Hello Dannie F,

The version you are using is not working with jquery 1.4.1. I recommend upgrading to jquery 1.4.2 and setting jQuery(false) for the ScriptRegistrar to suppress the built-in jquery reference.

All the best,
Atanas Korchev
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.
0
Dannie F
Top achievements
Rank 1
answered on 30 Apr 2010, 04:09 PM
OK Thanks. I had wanted to see if I can avoid upgrading to 1.4.2
Tags
TreeView
Asked by
Dannie F
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Dannie F
Top achievements
Rank 1
Share this question
or