8 Answers, 1 is accepted
0
Hi LFA,
The Clone method will be implemented for the service pack. It seems we have overlooked it - thanks for bringing this up.
Regards,
Albert
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
The Clone method will be implemented for the service pack. It seems we have overlooked it - thanks for bringing this up.
Regards,
Albert
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

Jonathan Simmons
Top achievements
Rank 1
answered on 01 Jan 2008, 11:53 PM
When will the Clone method and the service pack be available? This is a method I commonly use and I want to change a load of pages to use the Prometheus treeview.
Jonathan
Jonathan
0

LFA
Top achievements
Rank 1
answered on 02 Jan 2008, 05:35 AM
As a temporary fix I added RadTreeNode.Clone() using the new Extension Methods feature.
0

LFA
Top achievements
Rank 1
answered on 02 Jan 2008, 06:02 AM
Here you go. I added Remove() because it's also missing. Just import the MyExtensions namespace where you use Clone or Delete. I am not sure if the Clone method works exactly like the original. In my case it works. .NET 3.5 is required.
Imports System.Runtime.CompilerServices |
Imports Telerik.Web.UI |
Imports System.Reflection |
Namespace MyExtensions |
Public Module TreeNodeExtensions |
<Extension()> _ |
Public Function Clone(ByVal node As RadTreeNode) As RadTreeNode |
Dim copy As New RadTreeNode |
For Each prop As PropertyInfo In GetType(RadTreeNode).GetProperties() |
If prop.CanRead And prop.CanWrite Then |
prop.SetValue(copy, prop.GetValue(node, Nothing), Nothing) |
End If |
Next |
Return copy |
End Function |
<Extension()> _ |
Public Sub Remove(ByVal node As RadTreeNode) |
If node.ParentNode Is Nothing Then |
node.TreeView.Nodes.Remove(node) |
Else |
node.ParentNode.Nodes.Remove(node) |
End If |
End Sub |
End Module |
End Namespace |
0

Jonathan Simmons
Top achievements
Rank 1
answered on 03 Jan 2008, 12:31 PM
LFA - Many thanks for this.
Regards,
Jonathan
Regards,
Jonathan
0

BSolveIT
Top achievements
Rank 2
answered on 29 Jun 2008, 01:18 PM
Is the clone() method still not implemented?
Cheers
Mark
Cheers
Mark
0
Hi BSolveIT,
The server-side Clone has been implemented already.
Please download and install the latest version of RadControls for ASP.NET AJAX in order to take advantage of the method in your applications.
Kind regards,
Simon
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
The server-side Clone has been implemented already.
Please download and install the latest version of RadControls for ASP.NET AJAX in order to take advantage of the method in your applications.
Kind regards,
Simon
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

Bob
Top achievements
Rank 1
answered on 08 Aug 2008, 05:54 PM
Will there be a client version of the clone function?