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

Migrating from RadTreeView for ASP.NET to ASP.NET Ajax

0 Answers 25 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Vijay
Top achievements
Rank 1
Vijay asked on 01 Jun 2010, 07:43 PM
I have migrated to telerik asp.net ajajx controls. Below is the javascript code which was working fine for RadTreeView when I was using the older verison of telerik controls but it is not working anymore after migrating to ASP.NET ajax controls.

 
Below is the code when I was using older version of telerik controls.

function CheckAllLeafs()  
    {  
        var i;            
        var lvlChk= document.getElementById("CheckAllLeafsDropDown").options[document.getElementById("CheckAllLeafsDropDown").selectedIndex].value;   
        for (i=0; i<TopicsTree.all.length; i++){  
         {  
                if(TopicsTree.all[i].Level == lvlChk)  
                {  
                    TopicsTree.all[i].Check();  
                }  
                else 
                {  
                    TopicsTree.all[i].Check();              }  
            }  
        }          
    } 


After mograting to the ASP>NET Ajajx controls, I made the following changes

 

function CheckAllLeafs()  
    {  
        var i;            
        var lvlChk= document.getElementById("CheckAllLeafsDropDown").options[document.getElementById("CheckAllLeafsDropDown").selectedIndex].value;   
        for (i=0; i<TopicsTree.all.length; i++){  
        if(TopicsTree.all[i].tagName == "INPUT") {  
                if(TopicsTree.all[i].Level == lvlChk)  
                {  
                    TopicsTree.all[i].Checked = true;  
                }  
                else 
                {  
                    TopicsTree.all[i].Checked = false;  
                }  
            }  
        }          
    } 

 


But it never executes statement 'TopicsTree.all[i].Level == lvlChk' since there is no property such as 'Level'. I could find the property for 'check' but can't find for 'Level'.

Plese help me!

No answers yet. Maybe you can help?

Tags
TreeView
Asked by
Vijay
Top achievements
Rank 1
Share this question
or