This is a migrated thread and some comments may be shown as answers.

RadTreeNodeData not defined on client side

2 Answers 74 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Ron
Top achievements
Rank 1
Ron asked on 10 Sep 2012, 06:46 PM
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%>");
 treeView.get_nodes().clear();
 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 ?

Thanks

2 Answers, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 13 Sep 2012, 08:02 AM
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,
Bozhidar
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.
0
Ron
Top achievements
Rank 1
answered on 13 Sep 2012, 01:15 PM
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; )

Thanks
Tags
TreeView
Asked by
Ron
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Ron
Top achievements
Rank 1
Share this question
or