Hello,
I am using RadTreeView in my ASP.Net WebPart however while access the same control from client side I am getting null for $find().
I am loading the RadTreeView from class which inherits the ASP.Net WebPart class as follows:
I am trying to use get the same control from client side from javascript file as follows:
I am getting tree as null, I have went throught all the documentation provided however not sure what missing.
The control render in page as below:
Please let me know your thoughts.
I am using RadTreeView in my ASP.Net WebPart however while access the same control from client side I am getting null for $find().
I am loading the RadTreeView from class which inherits the ASP.Net WebPart class as follows:
protected override void CreateChildControls() {RadTreeView treeview = new RadTreeView() { ID = "RadTreeView", Width = new System.Web.UI.WebControls.Unit(285), Height = new System.Web.UI.WebControls.Unit(290), CheckBoxes = true }; treeview.Nodes.Add(new RadTreeNode("Test")); Controls.Add(treeview);base.CreateChildControls(); }I am trying to use get the same control from client side from javascript file as follows:
function pageLoad() { checkMain();}function checkMain() { var tree = $find("<%= RadTreeView1.ClientID %>"); alert(tree);} I am getting tree as null, I have went throught all the documentation provided however not sure what missing.
The control render in page as below:
<div style="overflow:auto;height:290px;width:285px;" class="RadTreeView RadTreeView_Default" id="ctl00_m_g_105ccf0c_7bb3_4553_b184_03f24f749c13_RadTreeView"> <ul class="rtUL rtLines"> <li class="rtLI rtFirst rtLast"><div class="rtTop"> <span class="rtSp"></span><input type="checkbox" class="rtChk"><span class="rtIn">Test</span> </div></li> </ul><input type="hidden" name="ctl00_m_g_105ccf0c_7bb3_4553_b184_03f24f749c13_RadTreeView_ClientState" id="ctl00_m_g_105ccf0c_7bb3_4553_b184_03f24f749c13_RadTreeView_ClientState" autocomplete="off" value="{"expandedNodes":[],"collapsedNodes":[],"logEntries":[],"selectedNodes":[],"checkedNodes":[],"scrollPosition":0}"> </div>Please let me know your thoughts.