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

Load On Demand

5 Answers 47 Views
OrgChart
This is a migrated thread and some comments may be shown as answers.
Sekhar
Top achievements
Rank 1
Sekhar asked on 27 Dec 2013, 01:27 PM
Hi,

In the demo for load on demand, it doesn't look like a true Load on Demand because all the teams and employees are already populated.
But the Demo for treeview @ "http://www.telerik.com/help/aspnet-ajax/treeview-load-on-demand-server.html" is a true Load on demand, where the child nodes are retrieved from the database only when the parent node is clicked.

How do i achieve similar functionality with orgchart?

Thank you
-Sekhar

5 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 30 Dec 2013, 07:44 AM
Hello Sekhar,

I have inspected the Load on Demand demo with RadOrgChart but its items were initially not loaded or rendered and only after expand they appeared on the page as expected. Here is a video of the test that I made. Would you please review it and let me know if you have in mind something else or some other scenario so we could inspect it and be more 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.
0
Sekhar
Top achievements
Rank 1
answered on 30 Dec 2013, 03:02 PM
Hi Plamen,

In the demo on the page_load method it calls creatTeams() and CreateEmployees(), so doesn't this mean that all the data is retrieved by the time the page is loaded? So in the demo you are creating the teams and employees statically. consider the case where i have to retrieve the same data from database, so as per the demo code i am getting all the data by the time the page loads. Where is in the code that says that the data of the node is only retrieved when the node is clicked?



 protected void Page_Load(object sender, EventArgs e)
          {
               CreateTeams();
               CreateEmployees(); 
}


0
Plamen
Telerik team
answered on 30 Dec 2013, 03:59 PM
Hello,

This functionality  is implemented internally and is controlled by the LoadOnDemand property as it is described in this help article

Hope this will explain the issue.

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.
0
Sekhar
Top achievements
Rank 1
answered on 30 Dec 2013, 04:07 PM
Hi Plamen,

Sorry i am still confused. Even in the help  it says "On the initial page load all Nodes and GroupItems of the RadOrgChart are bound. On every callback the RadOrgChart is rebound as well" doesn't this mean the all the data is retrieved on the initial page load?

In the RadTree view example it clearly loads the child data by getting the data from the database when the node expands.


Could you please send me a sample similar to RAdTreeView for RadOrgchart
0
Plamen
Telerik team
answered on 02 Jan 2014, 12:41 PM
Hello,

Yes indeed the default Load on demand in RadOrgChart is a little bit different from the one in RadTreeView but it working the same way-it is loading only the nodes that are visible and expanded. Another possible way to achieve similar behavior is to use Web Service binding where the nodes are loaded after expand too.

Unfortunately exactly the same behavior as the one in RadTreeView is not supported.

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
Sekhar
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Sekhar
Top achievements
Rank 1
Share this question
or