Frage

Here i have use below code for Telerik Rad Tree.Unable to catch the RadTreeView1 ,thisone working without any issue in my localhost but when i put a debugger to there then it shows me the null.

<div style="border: 1px solid #25A0DA; margin: 5px; padding: 5px; min-height: 400px; min-width: 200px;">
    <telerik:RadTreeView ID="RadTreeView1" OnClientNodeClicked="ClientNodeClicked"
        OnClientNodeCollapsed="ClientNodeCollapsedHandler"
        Font-Size="Small" Skin="Metro" runat="server">
        <ExpandAnimation Type="none"></ExpandAnimation>
        <CollapseAnimation Type="none"></CollapseAnimation>
        <WebServiceSettings Path="~/DesktopModules/hh/hc.asmx" Method="GetChildNodes">
        </WebServiceSettings>
    </telerik:RadTreeView>
</div>

Here is the function

 function LoadRootNodes() {
   var treeView = $find('<%=RadTreeView1.ClientID%>'); <-- pass null here
    //Some codes here
       }

In here unable to find a RAD Treeview1 from $find.

War es hilfreich?

Lösung

Try this,

treeview.OnClientLoad = "LoadRootNodes";

Javascript file

function LoadRootNodes(sender, args) {
var treeview=sender;

}
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top