Ro find when ContentUrl has started loding

4 posts, 0 answers
  1. Rocky
    Rocky avatar
    6 posts
    Member since:
    Dec 2008

    Posted 23 Jan 2009 Link to this post

    I was using Iframe to load my reports and I was able to call a function when the report gets loaded. I have menu items for each reports and the new reports gets loaded in iframe. Our reports are very huge and takes time even before we see the new repots gets loaded in iframe.
     
    <iframe frameborder="0" scrolling="no" marginwidth="0" marginheight="0" align="left"  id="ReportFrame" onload="stopAnimation()" ></iframe>

    Now I am using RadPane to generate two reports side by side. I am setting , but there is no way for me to know
     
    <telerik:RadSplitter id="RadSplitter1" runat="server" width="100%" height="800" Orientation="Vertical">  
    <telerik:RadPane id="LeftPanel" runat="server">
    </telerik:RadPane>
    <telerik:RadSplitBar id="RadSplitBar1" runat="server" collapsemode="Both"></telerik:RadSplitBar>
    <telerik:RadPane id="RightPanel" runat="server">
    </telerik:RadPane>
    </telerik:RadSplitter>

    <script type="text/javascript">
    function renderReport(url) {

    var splitter = $find("<%= RadSplitter1.ClientID %>"); 
    var vLeftPanel = splitter.getPaneById("LeftPanel");
    var vRightPanel = splitter.getPaneById("RightPanel"); 
     
    vLeftPanel.set_contentUrl(url);
    vRightPanel.set_contentUrl(url);
    setTimeout('stopAnimation()', 1000);
    }

    function stopAnimation() {
    var splitter = $find("<%= RadSplitter1.ClientID %>");
    var vRightPanel = splitter.getPaneById("RightPanel");
    if (vRightPanel.isExternalContent()) {
    var silverlightObject = document.getElementById("ReportSilverlightControl"); silverlightObject.content.SilverlightJSCaller.StopLoadingAnimation();
    return;
    }
    else {
    setTimeout(
    'stopAnimation()', 1000);
    }
    }

    isExternalContent() returns true soon after the url is set and not when the page is loaded. There is no way for me to know when the RadFrame has started loading the way I used to do for IFrame.

    Can someone please helpme in knowing how can I get this working.

  2. Rocky
    Rocky avatar
    6 posts
    Member since:
    Dec 2008

    Posted 23 Jan 2009 Link to this post

    I just found that RadPanes with contentURL will be rendered within IFrame. Is there a way I can add onload even to Radpane like: 

    <

     

    telerik:RadPane id="TopPanel" runat="server" OnLoad="afterLoad">

     

     

    But adding onLoad to RadPane tag throws error.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Rocky
    Rocky avatar
    6 posts
    Member since:
    Dec 2008

    Posted 23 Jan 2009 Link to this post

    The other issue I am facing after the sue of RadPane is it takes longer time for second report to even show up in the pane after I click the new menu. The time taken to show up report in my previous Iframe and RadPane is same for the first time. But when I click on the new menu item when the first report is still loading, the iframe works better when compared to radPane. In Rad pane, the new report doesn't get loads until the first report is completed loaded and then the second report starts getting loaded.  Our reports are very huge and it takes about 1 minute to get generated.

    Is there a way to void the loading of first report when the new report menu item is clicked. Else the users will have to wait until the first report is completely loaded before the second report start getting loaded. This issue wasn't there when I was using Iframe.
  5. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 27 Jan 2009 Link to this post

    Hello Rocky,

    Straight to your questions:

    1. As you have found out yourself, when you set the RadPane's ContentUrl property an IFRAME element is created. You can reference this IFRAME by using the RadPane's client API and in particular the getExtContentElement method. Once you have referenced the IFRAME you can work with it in the standard manner since it is a standard element.
    2. Since the RadPane with a ContentUrl is  actually an IFRAME, there should not be differences in the behavior. I also tested the behavior in this online demo but could not noticed the described problem. If the problem persists, please open a new support ticket and send us a reproduction demo with a standard IFRAME and a RadPane, detailed reproduction steps and description of the actual and the desired behavior.
    Sincerely yours,
    Svetlina
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top