RadOrgChart remove rendered fields for some node in NodeDataBound

2 posts, 0 answers
  1. Mira
    Mira avatar
    5 posts
    Member since:
    Feb 2013

    Posted 14 Apr 2014 Link to this post

    I have an OrgChart  with 2 rendered fields. Am trying to remove the rendered fields for the Root node. i tried to access the node's rendered fields  in the nodeDataBound event, but its not working:

    example:

      if (e.Node.ID == "Parent")
                {
                    for (int i = e.Node.GroupItems[0].RenderedFields.Count - 1; i >= 0; i--)
                    {
                        e.Node.GroupItems[0].RenderedFields[i] = new OrgChartRenderedField();
                    }
                }

    Thanks
    Mira
  2. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 16 Apr 2014 Link to this post

    Hello Mira,

    I would like to clarify that such scenario could not be achieved on the server-side. Please use the following code in your pageLoad client-side event handler in order to hide the render fields for your root node:
    //JavaScript
    function pageLoad() {
        $telerik.$(".rocRootNode .rocNodeFields")[0].style.visibility = "hidden";
    }



    Regards,
    Boyan Dimitrov
    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top