I've been trying to change the NavigateUrl attribute of a Node in a TreeView from codebehind when the tree is initially loaded.
This returns the following error: "Unable to cast object of type 'System.EventArgs' to type 'Telerik.Web.UI.RadTreeNodeEventArgs'."
In order to get around this problem I decided to do a Response.redirect and I can move to the desired page but I would like to be able to change the NavigateUrl attribute of a given Node during the Load of the TreeView.
Any help is appreciated.
Protected Sub RadTreeView1_NodeClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles RadTreeView1.Load RadTreeView1.FindNodeByText("Upload Company Documents").NavigateUrl() = "~/upload/upload.aspx?b=" & Server.UrlEncode(Encrypt("&DT=C" & "&dummy="))End SubThis returns the following error: "Unable to cast object of type 'System.EventArgs' to type 'Telerik.Web.UI.RadTreeNodeEventArgs'."
In order to get around this problem I decided to do a Response.redirect and I can move to the desired page but I would like to be able to change the NavigateUrl attribute of a given Node during the Load of the TreeView.
Protected Sub RadTreeView1_NodeClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles RadTreeView1.NodeClick If RadTreeView1.FindNodeByText("Upload Company Documents").Selected Then Response.Redirect("~/upload/upload.aspx?b=" & Server.UrlEncode(Encrypt("&DT=C" & "&dummy=")) End IfEnd SubAny help is appreciated.