Make controls visible as they load

3 posts, 0 answers
  1. Jeffrey
    Jeffrey avatar
    2 posts
    Member since:
    Oct 2013

    Posted 13 Nov 2013 Link to this post


    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 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:

    where it is clear that one loads before the other.

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

  2. Jeffrey
    Jeffrey avatar
    2 posts
    Member since:
    Oct 2013

    Posted 17 Nov 2013 Link to this post



    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.

  3. Viktor Tachev
    Viktor Tachev avatar
    2501 posts

    Posted 18 Nov 2013 Link to this post

    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.

    Viktor Tachev
    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.
Back to Top