I want to know, how can I get child nodes for selected shapes?
A ---> A1-->A3,A4
A ---> A2-->A5,A6
Here A is root with two child's A1,A2.
So if I select A1 then I want to know which shapes are connected (i.e. outgoing links connected shapes from A1).
4 Answers, 1 is accepted
You can iterate over the items through items, shapes or connections. After getting a list, you can then look at the list of items and take it from there.
This link will bring you to the documentation on iteration of diagram items. Below is an example of how you would do it:
There are some Extensions methods that you can use - GetConnectionsForShape(this IGraph graph, IShape shape) or IEnumerable<IConnection> GetOutgoingConnectionsForShape(this IGraph graph, IShape shape).
So the code will be something like this:
And the connectedShapes will contain the outgoing shapes of the myShape shape. Kind regards,
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
In current version of RadDiagram, I didn't found such a method to get connected shapes.
Can you check & tell me.