Connections are not drawn

2 posts, 0 answers
  1. Kannan
    Kannan avatar
    1 posts
    Member since:
    Aug 2012

    Posted 27 Aug 2012 Link to this post


    I am new to Telerik controls. I have tried to replicate the OrgChart sample and with simple collection. The Nodes and its links are not rendered correctly. I hereby attached the sample application which i have created.

    Sample Location:

    Please correct me if i did anything wrong,

    Kannan. s
  2. Petar Mladenov
    Petar Mladenov avatar
    2882 posts

    Posted 27 Aug 2012 Link to this post

    Hi Kannan,

     The RadDiagram must have prepared it's containers - (RadDiagramShapes and RadDiagramConnections) before invoking Layout and Routing methods. So instead of MainPage.Loaded, you can use the Diagram Loaded (which will fire later) and even add a Dispatcher to ensure the creation of the shapes.

    this.GraphSource = new GraphSource();
        this.DataContext = this;
        this.diagram.RoutingService.Router = this.router;
        this.treeLayout = new TreeLayout();
        this.diagram.Loaded += new RoutedEventHandler(diagram_Loaded);
        //this.diagram.Connections.ForEach(x => RadDiagramConnection.SetIsAutoUpdateSuppressed((RadDiagramConnection)x, true));
        //this.diagram.Connections.ForEach(x => RadDiagramConnection.SetIsAutoUpdateSuppressed((RadDiagramConnection)x, false));
        //this.diagram.Connections.ForEach(x => x.Update());
    void diagram_Loaded(object sender, RoutedEventArgs e)
    void MainPage_Loaded(object sender, RoutedEventArgs e)
       // this.LayoutOrgChart(false);
    You can find this realized in the attached solution. Please let us know if the suggested approach is suitable for you. Greetings,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft R3 2016 release webinar banner
Back to Top