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

DrillDown before loading OrgChart

1 Answer 70 Views
OrgChart
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 13 Dec 2013, 11:41 PM
I have created a page that displays an OrgChart and lets the user drilldown. I also let the user generate a PDF of the OrgChart. I am using a third party control to generate the PDF, and have a seperate page that I pass to the PDF generator(That page has less formatting like a printer friendly version). My problem is that although the drilldown works fine on the first page I need to be able to load the second page drilled down the same way. Is there a way to programmatically set the drilldown at load?

Or is there a way to generate an image of the chart, and then I could use that to create the PDF?

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 18 Dec 2013, 03:11 PM
Hello Robert,

By default such behavior is not supported in RadOrgChart but one way to achieve similar behavior is to override the default _executeDrillDown method. Here is a sample code that would drill to the node with hierarchical index "0:0":

var $ = $telerik.$,
                $T = Telerik.Web.UI;
 
            function pageLoad() {
                var orgChart = $find("<%=RadOrgChart1.ClientID%>");
 
                if (orgChart._drilledNodeHierarchicalIndex!="0:0") {
                    orgChart.drillDownOnNode("0:0");
                }
            }
 
           

Hope this will be helpful.


Regards,
Plamen
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.
Tags
OrgChart
Asked by
Robert
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or