<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">   
    </telerik:RadScriptManager>  
    <telerik:RadTreeView ID="TreeView1" runat="server" OnClientLoad="my_onload_expand">
        <Nodes>
            <telerik:RadTreeNode Text="Root">
                <Nodes>
                    <telerik:RadTreeNode Text="node1" />
                    <telerik:RadTreeNode Text="node2" />
                </Nodes>
            </telerik:RadTreeNode>
 
        </Nodes>
    </telerik:RadTreeView>
    </form>
    <script type="text/javascript">
        function my_onload_expand() {   
          var m_treeview = $find("<%= TreeView1.ClientID %>");   
          
          var node = m_treeview.findNodeByText("Root");   
          
          node.expand();   
        }  

    </script>
</body>
</html>
