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

Make controls visible as they load

2 Answers 53 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Jeffrey
Top achievements
Rank 1
Jeffrey asked on 13 Nov 2013, 03:47 PM
Hi,

I am very new to all this... And I think what I want to accomplish is doable, but I cannot seem to get it working right.

I have a page with a searchbox at the top and a 3 pane splitter, the top on contains an asp:panel with a radlistview inside it, this is linked to sqldatasource1 which is a stored procedure.  The middle pane contains just a radgrid whose datasource is sqldatasource2, also a stored procedure. The bottom pane is another asp:panel with a radlistview who has sqldatasource3, another stored procedure.

Right now I have a radajaxmanager whose AJAXcontrol id is the searchbox.

When the searchbox fires, in VB.net codebehind it takes the text of the search box, places it in a hidden field and then the sqldatasources are all set to their stored procedure names (whose parameters reference the hidden field) and then does a databind() on each.

The three queries take vastly different amounts of time and what I want is for the radajax loadingpanel to disappear from each control as it has its data bound.  Right now they all cease at the same time and it takes the sum of the 3 loading times.

How can I do this?  I feel like it might involve splitting the binding to three separate functions in the codebehind, but when I've tried that, the ajax seems to stop at the first (quickest) one, and only that pane is loaded.

From a lot of searching, I've found that I cannot have them load in parallel, which is fine, but I'd like to not have to wait for all 3 to load to view the first.

I'd like the effect to be similar to this: 
http://demos.telerik.com/aspnet-ajax/splitter/examples/showcontentduringload/defaultcs.aspx

where it is clear that one loads before the other.

Let me know if I can provide anything more to help.

Thanks!!

2 Answers, 1 is accepted

Sort by
0
Jeffrey
Top achievements
Rank 1
answered on 17 Nov 2013, 07:29 PM
Anybody?

Maybe?

I know my top panel is done loading far before my middle or lower one, I just want the circle to stop spinning in front of it while the others spin.

0
Viktor Tachev
Telerik team
answered on 18 Nov 2013, 12:56 PM
Hi Jeffrey,

The RadAjaxLoadingPanel is hidden when the Ajax request is complete. In your case there are three different controls, however they are updated with a single request (the one fired form the search box). This is why the loading icon is displayed for longer for some panes.

In the demo each RadPane is loading different page and there are actually two requests. This is why the loading time is different for each pane.

I am attaching modified version of the demo as illustration.There is a button that updates a RadSplitter control. Each RadPane loads different page and the loading icon stays longer in one of the panes. You could try this approach and see if it is working for you.

I hope this would be helpful.

Regards,
Viktor Tachev
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
Ajax
Asked by
Jeffrey
Top achievements
Rank 1
Answers by
Jeffrey
Top achievements
Rank 1
Viktor Tachev
Telerik team
Share this question
or