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

ASP.NET C# Org Chart Multiple Parents

9 Answers 205 Views
OrgChart
This is a migrated thread and some comments may be shown as answers.
Brendan
Top achievements
Rank 1
Brendan asked on 24 Sep 2013, 12:32 PM
Hi, I am looking for a solution to the following problem:

The ability to connect to a database using ASP.Net and C# and retrieve the hierarchical attribute of an entity in order to plot and draw its position within an org chart on a web page.

Special Requirements

  • Must allow for multiple parents
  • Must have the ability to skip rows directly beneath in order to reach entities in a subsequent row.

I have attached a file with an example chart that would need to be created dynamically by extracting the entities from a database according to their hierarchical code, plotting their positions on a web page, and drawing the relationships between them.
NB: Entities are labelled according to the row and column that they below two i.e. the first row with 5 entities would have the labels R1C1 to R1C5; the next row with 2 entities would have the codes R2C1 and R2C2

Kindest Regards,

Brendan

9 Answers, 1 is accepted

Sort by
0
Peter Filipov
Telerik team
answered on 27 Sep 2013, 08:28 AM
Hello Brendan,

Straight to the point. RadOrgChart control does not support the described cases. It is possible to have only one parent and the root node is obligatory.

Regards,
Peter Filipov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Azad
Top achievements
Rank 1
answered on 01 Nov 2013, 03:08 PM
I'm also very interested in such multiple-parent chart view. Is there any development in progress?
0
Peter Filipov
Telerik team
answered on 05 Nov 2013, 01:13 PM
Hi Brendan,

We are doing a research for the RadOrgChart control. When the next development steps are clear we are going to announce them publicly in our roadmap. Your feedback is valuable and we have logged it.

Regards,
Peter Filipov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Unais
Top achievements
Rank 1
answered on 08 Oct 2015, 12:24 PM
Is there any plan to develop a RadOrgChart Which support 2 or more root nodes ?
0
Peter Filipov
Telerik team
answered on 12 Oct 2015, 10:42 AM
Hi Unais,

We haven't plans to develop RadOrgChart with multiple roots nodes. You need to have one root.

Regards,
Peter Filipov
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
0
Unais
Top achievements
Rank 1
answered on 20 Oct 2015, 02:50 PM
Thanks for your reply.. Can you get me a javascript code to get node id value of Radorgchart
0
Peter Filipov
Telerik team
answered on 21 Oct 2015, 10:04 AM
Hello,

Please review the following help topic.

Regards,
Peter Filipov
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
0
Unais
Top achievements
Rank 1
answered on 03 Nov 2015, 12:30 PM

(function () {
    var $;
    var demo = window.demo = window.demo || {};
    var org;
    var win;
    var ajaxPanel;

    demo.initialize = function () {
        $ = $telerik.$;
        win = window.win;
        org = window.orgChart;
        contextMenu = window.contextMenu;
        ajaxPanel = window.ajaxPanel;
        setup();
    };

    var nodeId;
    var itemId;
    var windowUrl;

    window.onClientItemClicked = function(sender, args) {
        var item = args.get_item();
        var command = item.get_value();
        if (command == "Edit") {
            win.setUrl(windowUrl + "?itemID=" + itemId);
            win.show();
        } else if (command == "Add") {
            win.setUrl(windowUrl + "?nodeID=" + nodeId);
            win.show();
        }
        else if (command == "Remove") {
            win.setUrl(windowUrl + "?removeItemID=" + itemId);
            win.show();
        }
    }

    function setup() {
        windowUrl = win.get_navigateUrl();

        $(org.get_element()).delegate(".rocItem", $telerik.isTouchDevice ? "touchend" : "contextmenu", function (e) {
            var target = $telerik.getTouchTarget(e);
            if (!$(target).hasClass("rocEmptyItem")) {
                showMenu(e, true);
                var item = org.extractGroupItemFromDomElement(target);
                itemId = item.getId();
                var node = org.extractNodeFromDomElement(target);
                nodeId = node.getId();
            }
        })
        .delegate(".rocGroup", $telerik.isTouchDevice ? "touchend" : "contextmenu", function (e) {
            showMenu(e, false);
            var target = $telerik.getTouchTarget(e);

            var node = org.extractNodeFromDomElement(target);
            nodeId = node.getId();
        });
    }

    function showMenu(e, isVisible) {
        contextMenu.get_items().getItem(1).set_visible(isVisible);
        contextMenu.get_items().getItem(2).set_visible(isVisible);
        contextMenu.show(e);
        e.preventDefault();
    }

    window.onClientClose = function(sender, args) {
        if (!sender._isCancelled) {
            ajaxPanel.ajaxRequest();
        }
        else {
            sender._isCancelled = false;
        }
    }
})();

 I have got this java script.

But this is for a group enabled radorgchart..

and  I need a Java script to get node id of group disabled radorgchart.

Can you please help me out ?

 

 

 

 

 

 

 

 

 

 

 

 

0
Peter Filipov
Telerik team
answered on 06 Nov 2015, 08:31 AM
Hi Unais,

In simple binding the approach is the same. E.g.:
var org = $find("RadOrgChart1");
var id = org.get_nodes().getNode(0).getId();


Regards,
Peter Filipov
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
Brendan
Top achievements
Rank 1
Answers by
Peter Filipov
Telerik team
Azad
Top achievements
Rank 1
Unais
Top achievements
Rank 1
Share this question
or