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

Permanent Loading Indicator?

6 Answers 177 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
James Legan
Top achievements
Rank 1
James Legan asked on 27 Apr 2009, 11:04 AM
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?

6 Answers, 1 is accepted

Sort by
0
Lini
Telerik team
answered on 29 Apr 2009, 07:15 AM
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.
0
Derick
Top achievements
Rank 1
answered on 19 May 2009, 03:01 PM
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
0
Fiko
Telerik team
answered on 20 May 2009, 08:56 AM
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.
0
Derick
Top achievements
Rank 1
answered on 20 May 2009, 09:10 AM
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

0
Meninx
Top achievements
Rank 1
answered on 25 May 2009, 01:00 PM
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 ;-)
0
Fiko
Telerik team
answered on 25 May 2009, 02:16 PM
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.
Tags
FileExplorer
Asked by
James Legan
Top achievements
Rank 1
Answers by
Lini
Telerik team
Derick
Top achievements
Rank 1
Fiko
Telerik team
Meninx
Top achievements
Rank 1
Share this question
or