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

RadOrgChart remove rendered fields for some node in NodeDataBound

1 Answer 75 Views
OrgChart
This is a migrated thread and some comments may be shown as answers.
Mira
Top achievements
Rank 1
Mira asked on 14 Apr 2014, 06:31 AM
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

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 16 Apr 2014, 02:29 PM
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.

 
Tags
OrgChart
Asked by
Mira
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or