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

Tree view tool upgrade issue

1 Answer 48 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
rahul
Top achievements
Rank 1
rahul asked on 25 Sep 2014, 06:26 PM
protected void rtvTopLeftPatientMenu_NodeClick(object o, Telerik.WebControls.RadTreeNodeEventArgs e)
   {
 
       if (e.NodeClicked.Parent != null)
       {
           Session["NodeClicked"] = e.NodeClicked.Parent.Value;
           try
           {
               if (e.NodeClicked.Parent.Parent.Value != null)
               {
                   Session["NodeClicked"] = e.NodeClicked.Parent.Parent.Value;
               }
           }
           catch { };
       }
Hi Guys,

I recently updated telerik controls on a website. Earlier I was using Telerik.WebControls.RadTreeNodeEventArgs but now I'm using Telerik.web.ui.RadTreeNodeEventArgs.

Now my problem is when I change the telerik.webcontrol to telerik.web.ui .............this "e.NodeClicked" property starts showing an error saying that it does not have any property like that. Now I have to update this control but I'm stuck at e.NodeClicked.... So please guys help me out by suggesting some other property which replace this one.
erwerwwerewerererere
 
 protected void rtvTopLeftPatientMenu_NodeClick(object o, Telerik.WebControls.RadTreeNodeEventArgs e)
    {
 
        if (e.NodeClicked.Parent != null)
        {
            Session["NodeClicked"] = e.NodeClicked.Parent.Value;
            try
            {
                if (e.NodeClicked.Parent.Parent.Value != null)
                {
                    Session["NodeClicked"] = e.NodeClicked.Parent.Parent.Value;
                }
            }
            catch { };
        }
 protected void rtvTopLeftPatientMenu_NodeClick(object o, Telerik.WebControls.RadTreeNodeEventArgs e)
    {
 
        if (e.NodeClicked.Parent != null)
        {
            Session["NodeClicked"] = e.NodeClicked.Parent.Value;
            try
            {
                if (e.NodeClicked.Parent.Parent.Value != null)
                {
                    Session["NodeClicked"] = e.NodeClicked.Parent.Parent.Value;
                }
            }
            catch { };
        }
 protected void rtvTopLeftPatientMenu_NodeClick(object o, Telerik.WebControls.RadTreeNodeEventArgs e)
    {
 
        if (e.NodeClicked.Parent != null)
        {
            Session["NodeClicked"] = e.NodeClicked.Parent.Value;
            try
            {
                if (e.NodeClicked.Parent.Parent.Value != null)
                {
                    Session["NodeClicked"] = e.NodeClicked.Parent.Parent.Value;
                }
            }
            catch { };
        }

1 Answer, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 30 Sep 2014, 11:04 AM
Hi Rahul,

Probably there are breaking changes. You could retrieve the clicked node as you get the node from the event arguments:

e.Node

Have in mind that node's parent does not have value property, because if root node is clicked then the parent is the tree.

Regards,
Hristo Valyavicharski
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
TreeView
Asked by
rahul
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
Share this question
or