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.
- 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
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
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
We haven't plans to develop RadOrgChart with multiple roots nodes. You need to have one root.
Regards,
Peter Filipov
Telerik
Please review the following help topic.
Regards,
Peter Filipov
Telerik
(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 ?
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