Changing the z-index (order) of shapes and connections of Telerik RadDiagram

358 Views Asked by At

I am using Telerik RadDiagram for building a diagram. The gray lines are over the shapes (requirements, development etc) in my diagram. Is there any way to put them behind the shapes?

enter image description here

// ... getting ready the shape objects ...

for (int i = 0, j = 0; i < monthCount + 1; i++, j = j + 2)
{
    // ... getting ready the shape and connection objects ...

    RadDiagram1.ShapesCollection.Add(shapeForLines[j]);
    RadDiagram1.ShapesCollection.Add(shapeForLines[j + 1]);
    RadDiagram1.ConnectionsCollection.Add(monthLine[i]);
    RadDiagram1.ShapesCollection.Add(labelMonth[i]);
}


for (int i = 0; i < 7; i++)
{
    if (i < 6) { RadDiagram1.ShapesCollection.Add(shape[i]); }
    if (i < 7) { RadDiagram1.ShapesCollection.Add(label[i]); }
}
2

There are 2 best solutions below

0
On

This worked for me: while the Default.aspx loads a Java-Script-Method is called and there the Connections are brought to back:

function diagram_load(sender) {
    diagram = sender.get_kendoWidget();
    //.....
    diagram.toFront(diagram.Shape);
    diagram.toBack(diagram.connections);
} // diagram_load(sender)
0
On

try to set ZIndex property while you create shapes. i set this in WinForms, maybe you can find it too