RadTreeView for ASP.NET

Java script errors - 'RadTreeview' is undefined Send comments on this topic.
TroubleShooting > Java script errors - 'RadTreeview' is undefined

Glossary Item Box

Symptoms

treeview undefined

Causes and Solutions

Telerik RadTreeView cannot find its java script file. The necessary file is fetched either from the WebResource.axd file or from the RadControls folder, depending on the control's settings.

Case 1: UseEmbeddedScripts property of Telerik RadTreeView is set to false

In this case Telerik RadTreeView will search for its java script file in the RadControls folder:

RadControls JS

The following script will be part of the rendered output of the treeview:

  Copy Code
<div id="RadTreeView1_wrapper">
<!-- 6.1.2 --><script type="text/javascript" src="/WebSite5/RadControls/TreeView/Scripts/6_1_2/RadTreeView.js"></script>

If the file is not physically in the location specified by the src property, or there is a version mismatch, or the file is unaccessible, you will experience 'RadTreeview' is undefined error.  To make sure that this is really the case, you can copy the path to the RadTreeView.js file in the browser and see if you have access to this file. If you cannot retrieve this file you will see the following error message:

The solution is to make sure that the file is intact, its version matches that of the DLL of the control, and it is in the location specified by the src property. If the file is accessible you will be able to view it or download it:

 

Case 2: UseEmbeddedScripts property of Telerik RadTreeView is set to true (Default case)

In this case Telerik RadTreeView will search for its java script file embedded in the WebResource.axd as part of the DLL of the control.

The following script will be part of the rendered output of the treeview:

  Copy Code
<div id="RadTreeView1_wrapper">
<!-- 6.1.2 --><script type="text/javascript"
        
src="/WebSite5/WebResource.axd?d=tdrHY-nQv4tw0RdbJ9394MG1vHzgI126PRAp_a0R0A1X8HUjZ_p3k
                                  
UqyttXIHIs-JPuQw3FirGRJ8y5hIjCmRLQIc1Im_kfhWhGbG7UCS6QLyZE1s5niuYstHEi7OnDz0&
                                  
t=633083580140000000">
                     
</script>

If you try to view the file from the location specified by the src property, but it is not accessible, you will get the following error:

 

The following articles discuss possible causes and solutions of the problem: