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

Adding nodes manually

1 Answer 13 Views
OrgChart
This is a migrated thread and some comments may be shown as answers.
Al
Top achievements
Rank 1
Iron
Iron
Veteran
Al asked on 04 Nov 2015, 08:44 AM

Hi,

Is it possible to add nodes on client and server manually outside of databinding? I mean like .nodes.add(new orgchartnode("abc"))

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 06 Nov 2015, 05:25 PM
Hello,

While new nodes cannot be added to the OrgChart on the client here's how you can add on the server a Node containing a single Group Item to an existing Node (accessed by index):
var newNode = new OrgChartNode();
newNode.GroupItems.Add(new OrgChartGroupItem() { Text = "NewItem" });
RadOrgChart1.Nodes[0].Nodes.Add(newNode);

Regards,
Ivan Danchev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
OrgChart
Asked by
Al
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Ivan Danchev
Telerik team
Share this question
or