FileExplorer stops working when visibility is toggled

2 posts, 0 answers
  1. Jenna Schmidt
    Jenna Schmidt avatar
    2 posts
    Member since:
    May 2005

    Posted 31 Mar 2009 Link to this post


    I am running into a problem with the FileExplorer. Here is how I have my page setup:

    The FileExplorer is in a placeholder which starts with visible=true.
    When a button on the page is clicked, the placeholder containing the FileExplorer is set to visible=false.
    When another button on the page is clicked, the placeholder containing the fileexplorer is set back to visible=true

    After the second button is clicked and the fileexplorer becomes visible again, it no longer works. No items load in the right pane. I copied the following code for the initialization of the fileexplorer on page_load from the demo located at

    Protected Sub Page_Load(ByVal sender As ObjectByVal e As EventArgs) 
                FileExplorer1.EnableViewState = False 
                FileExplorer1.EnableOpenFile = enableOpenFile.Checked 
                FileExplorer1.DisplayUpFolderItem = displayUpFolder.Checked 
                If Not enableUpload.Checked Then 
                    FileExplorer1.Configuration.UploadPaths = New String(0) {} 
                End If 
                FileExplorer1.InitialPath = Page.ResolveUrl("~/FileExplorer/Examples/Default/Images/Northwind/Flowers/"
            End Sub 
            Protected Sub UpdateVisibleControls() 
                Dim explorerControls As Telerik.Web.UI.FileExplorer.FileExplorerControls = 0 
                If visibleControls.Items(0).Selected Then 
                    explorerControls = explorerControls Or Telerik.Web.UI.FileExplorer.FileExplorerControls.AddressBox 
                End If 
                If visibleControls.Items(1).Selected Then 
                    explorerControls = explorerControls Or Telerik.Web.UI.FileExplorer.FileExplorerControls.Grid 
                End If 
                If visibleControls.Items(2).Selected Then 
                    explorerControls = explorerControls Or Telerik.Web.UI.FileExplorer.FileExplorerControls.Toolbar 
                End If 
                If visibleControls.Items(3).Selected Then 
                    explorerControls = explorerControls Or Telerik.Web.UI.FileExplorer.FileExplorerControls.TreeView 
                End If 
                FileExplorer1.VisibleControls = explorerControls 
            End Sub 

    After running into the problem, I thought that the fileexplorer might need to be re-initialized after having its visibility toggled, so I tried running the above code again. It did not work, so I tried running just certain parts of it, and it still did not work.

    Any ideas?


  2. Fiko
    Fiko avatar
    1406 posts

    Posted 01 Apr 2009 Link to this post

    Hello Jenna,

    On the example we set a value "false" to the EnableViewState property for demonstration purposes only. In a real scenario we do not recommend to set it to "true" because of possible problems - such as in your scenario.

    Best wishes,
    the Telerik team

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