RadTreeNodeData not defined on client side

3 posts, 0 answers
  1. Ron
    Ron avatar
    17 posts
    Member since:
    Jul 2011

    Posted 10 Sep 2012 Link to this post

    partial client side code:
    This code works while in VS2010 IDE, but not when on localhost or server

    var strSearch = $find('<%= radtxtSearch.ClientID%>').get_textBoxValue().toUpperCase();
     var strSearchType = $find('<%= radcmbSearch.ClientID%>').get_text().toUpperCase();
     treeView = $find("<%=treeView.ClientID%>");
     var node = new Telerik.Web.UI.RadTreeNodeData(); 
     node.Attributes = new Array(2);
     var attr = {}
     attr.Key = "NodeType";
    when in localhost or server, it returns object

    Object expected  when creating the new  node because RadTreeNodeData does not exist.

    Any ideas what to look for ?

  2. Bozhidar
    Bozhidar avatar
    1095 posts

    Posted 13 Sep 2012 Link to this post

    Hi Ron,

    RadTreeNodeData is a class that's designed specifically for WebService LoadOnDemand in RadTreeView. It's purpose is to provide a simplified version of the RadTreeNode class in order to reduce the volume of information sent from the WebService. It doesn't have a client object, as it doesn't need one. When the result from the WebService is received, a client object of type Telerik.Web.UI.RadTreeNode is created and populated with the properties from the service. So if you need to do any work with tree nodes on the client, you should use the Telerik.Web.UI.RadTreeNode class.
    Kind regards,
    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.
  3. DevCraft R3 2016 release webinar banner
  4. Ron
    Ron avatar
    17 posts
    Member since:
    Jul 2011

    Posted 13 Sep 2012 Link to this post

    We use RadTreeNodeData on the client to pass attributes to the webservices.
    Turns out the parenthesis are not needed (i.e. just  var node = new Telerik.Web.UI.RadTreeNodeData; )

Back to Top