only My site

Friday, August 24, 2012

Tekerik RADTreeView - Tips

1. Clone()
There is a clone() method for node object. This is very useful to reuse a hierarchical tree structure node in different Telerik tree view controls. We cannot add a node to multiple tree view control without cloning a copy of the node.

Example : 

RadTreeNode objNewNode = new RadTreeNode();
objNewNode  = objOldTreeNode.Clone(); 

TreeViewOld.Nodes.Add( objOldNode);
TreeViewNew.Nodes.Add( objNewNode);

2. LoadXMLString()
We can load the tree view with nodes using the XML string value. The XML should be well structured and hierarchical order.

objNewTree.LoadXmlString(strXml);

No comments: