Hi,
I need to get an array of the root nodes of my tree view, but when i try, the tree view is a divElement and the nodes indefined.
This is my code:
JS:
function deshabilitarNodos(treeView, args) {
alert("Llegue");
var tree = <%=RadTreeView2.ClientID %>
alert (tree);
var nodosPrincipales= tree.Nodes;
alert(nodosPrincipales); // This is indefined
}
ASP:
<telerik:RadTreeView ID="RadTreeView2" runat="server" Width="300px"
Height="900px" DataFieldID="Id" DataFieldParentID="Padre"
ImageUrlField ="Imagen" DataSourceID="ObjectDataSource1"
DataTextField="Nombre" DataValueField="Id" OnClientNodeExpanding="deshabilitarNodos" >
<DataBindings>
<telerik:RadTreeNodeBinding ImageUrlField="Imagen" Expanded="false" />
</DataBindings>
</telerik:RadTreeView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
SelectMethod="cargarSegmentos" TypeName="PL.Util.cliente">
</asp:ObjectDataSource>
Thanks.
I need to get an array of the root nodes of my tree view, but when i try, the tree view is a divElement and the nodes indefined.
This is my code:
JS:
function deshabilitarNodos(treeView, args) {
alert("Llegue");
var tree = <%=RadTreeView2.ClientID %>
alert (tree);
var nodosPrincipales= tree.Nodes;
alert(nodosPrincipales); // This is indefined
}
ASP:
<telerik:RadTreeView ID="RadTreeView2" runat="server" Width="300px"
Height="900px" DataFieldID="Id" DataFieldParentID="Padre"
ImageUrlField ="Imagen" DataSourceID="ObjectDataSource1"
DataTextField="Nombre" DataValueField="Id" OnClientNodeExpanding="deshabilitarNodos" >
<DataBindings>
<telerik:RadTreeNodeBinding ImageUrlField="Imagen" Expanded="false" />
</DataBindings>
</telerik:RadTreeView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
SelectMethod="cargarSegmentos" TypeName="PL.Util.cliente">
</asp:ObjectDataSource>
Thanks.