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

Replacements for BeforeClientToggle and SkinsPath

1 Answer 15 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
SorinC
Top achievements
Rank 1
SorinC asked on 21 Oct 2011, 07:32 PM

Hello,

Moving an ASP.Net project from RadControls for ASP.NET Q1 2009\NET2 to Telerik.Web.UI, Version=2011.1.413.40 I discovered that some properties do not exist for the RadTreeView.

1. BeforeClientToggle: I used this property in the old version to expand all children when the node was expanded:

<rad:RadTreeView 
    ID="treeTest" 
    runat="server" 
    title="Test" 
    BeforeClientToggle="ClickHandler" 
    Width="100%" 
    OnNodeCreated="treeTest_NodeCreated">
  
[...]
  
<script language="javascript"
    function ClickHandler(objStartNode) 
    
        var objChildren = objStartNode.Nodes; 
        var intChildCnt = objChildren.length; 
        if(intChildCnt == 0) 
            return; 
        for (var intNodeIdx = 0; intNodeIdx < intChildCnt; intNodeIdx++) 
        
            var objChildNode = objChildren[intNodeIdx]; 
            objChildNode.Expand(); 
            if(intChildCnt != 0) 
                ClickHandler(objChildNode); 
        
    
</script> 

How should this behaviour be implemented in the new version of the control?

2. SkinsPath: When first working with RadTreeView, I downloaded the additional skins and used RoundBlue for rendering the grid:

protected void Page_Load(object sender, EventArgs e)
{
    //...
    treeTest.SkinsPath = "~/App_Themes/Skins";
    treeTest.Skin = "RoundBlue";
    //...
}

This property is not available for this version of the control and the code does not compile.
What should I use to replace this property?

Thank you.

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 24 Oct 2011, 10:15 AM
Hello Sorinc,

1. You can use onClientNodeExpanding instead of the BeforeClientToggle.

2. You can refer to Creating a custom skin and Migrating skins help articles to get a better knowledge how the skins are implemented.

Hope this will work.

All the best,
Plamen Zdravkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
TreeView
Asked by
SorinC
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or