Permanent Loading Indicator?

7 posts, 0 answers
  1. James Legan
    James Legan avatar
    54 posts
    Member since:
    Sep 2008

    Posted 27 Apr 2009 Link to this post

    I have been running into nothing but trouble with the FileExplorer control since I decided to go that direction with some code I am working on. I have not created a sample app yet, but here are the symptoms:

    1) If I try to toggle the visibility of the FileExplorer control (regardless of EnableViewState setting), all hell breaks loose. Javascript errors are thrown left and right about the controls inability to load elements of its embedded grid, etc... However, if I leave it visible OR put it in a panel and toggle the panels visibility, the issues go away.

    2) I get a permanent spinning loading indicator next to the root folder. If I double click on the + next to it, the folders below it are shown, but the indicator remains.

    3) I am after a folder selection solution so I disabled the grid control to the right of the tree control. However, if I leave the grid enabled, I get a constant ajax loading panel indicator in the middle of the control that eventually goes away (30+ seconds) and the directory only contains 3 folders.

    My setup:

    1) Running the latest build.
    2) Heavy use of RadAjaxManager but nothing is updating the FileExplorer control.
    3) It is embedded in a RadTabStrip/RadMultiPage (second tab in the strip)

    Is anyone else seeing any of these issues?
  2. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 29 Apr 2009 Link to this post

    Hi,

    We have been unable to reproduce the issues you are having using the latest RadControls for ASP.NET AJAX build. I tried putting the FileExplorer in an update panel and toggling its visibility with a button, then tried putting that update panel in a RadPageView that was initially hidden, etc.

    If possible, open a formal support ticket and send us a simple solution that shows the problematic behavior. Thank you in advance for your cooperation!

    Regards,
    Lini
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Derick
    Derick avatar
    9 posts
    Member since:
    Jul 2006

    Posted 19 May 2009 Link to this post

    This should show the permanent Loading indicator
            function ClientLoaded(sender) { 
                var wnd = getRadWindow(); 
                var openerPage = wnd.BrowserWindow; 
                if (typeof(openerPage.LoadFolder) == 'function') 
                    $find("<%=UploadPageFileExplorer.ClientID%>").loadFolder(openerPage.LoadFolder()); 
            } 
            <telerik:RadFileExplorer runat="server" ID="UploadPageFileExplorer" Width="500px" 
                Style="z-index: 99999" OnClientFileOpen="FileSelected" OnClientLoad="ClientLoaded" 
                Height="500px" Configuration-MaxUploadFileSize="100000"
                <Configuration ViewPaths="~/content" UploadPaths="~/content" DeletePaths="~/content" /> 
            </telerik:RadFileExplorer> 

    is there a fix to it?

    - Derick
  5. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 20 May 2009 Link to this post

    Hi Derick,

    The permanent loading image occurs, because of calling the laodFolder() function in the OnClientLoad event handler may be is much too early. In this event the first folder maybe is not already loaded and programmatically loading other folder cause the issue. In this case I recommend you set some time out ( 0 also does the trick) before calling the loadFolder() function as follows :

    function OnClientLoad() 
        setTimeout(function() 
        { 
            var wnd = getRadWindow(); 
            var openerPage = wnd.BrowserWindow; 
            if (typeof (openerPage.LoadFolder) == 'function'
                $find("<%= RadFileExplorer1.ClientID %>").loadFolder(openerPage.LoadFolder()); 
        }, 0); 

    This will solve the issue.

    One additional option is to call the code in the OnClientFolderLoaded event as follows :

    var isFirstCall = true
    function OnClientFolderLoaded(sender) 
        if (isFirstCall) 
        { 
            loadDirectory(); 
            isFirstCall = false
        } 
     
    function loadDirectory() 
        var wnd = getRadWindow(); 
        var openerPage = wnd.BrowserWindow; 
        if (typeof (openerPage.LoadFolder) == 'function'
            $find("<%= RadFileExplorer1.ClientID %>").loadFolder(openerPage.LoadFolder()); 


    The isFirstCall variable indicates that the event is fired first time and it is used in order to avoid the recursively calling the OnClisentFolderLoaded event.
    $find("<%= RadFileExplorer1.ClientID %>").loadFolder(openerPage.LoadFolder()); 

    The oFileExplored.loadFolder() will raise the OnClientFolderLoaded event as well.

    I hope this helps.

    Greetings,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Derick
    Derick avatar
    9 posts
    Member since:
    Jul 2006

    Posted 20 May 2009 Link to this post

    Thanks Fiko, got this sorted out. The OnClientFolderLoaded event worked better as I needed to give a 1 second (1000) delay for the timeout to avoid the recursive loading indicator.

    Kind Regards,

    Derick

  7. Meninx
    Meninx avatar
    18 posts
    Member since:
    May 2007

    Posted 25 May 2009 Link to this post

    Hi,

    I'm getting the same problem. Using the telerik version 2009.1.402  (2.0)
    the loading indicator don't stop. Im trying your solution but I get another error at getRadWindow which is not definied for me.
    How can I resolve that ?
    where is getRadWindow  ?

    thanks for the help

    regards ;-)
  8. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 25 May 2009 Link to this post

    Hi Jean-Christophe,

    The GetRadWindow() function is declared on the page that is opened inside a RadWindow and gets reference to that RadWindow. More details about that function can be found on this help page.

    I hope this helps.

    Best wishes,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017