FileExplorer Tree loses state within a MultiPage with RenderSelectedPageOnly=True

3 posts, 0 answers
  1. Santiago
    Santiago avatar
    14 posts
    Member since:
    Dec 2006

    Posted 16 Feb 2011 Link to this post

    Hi, I'm having trouble with a FileExplorer inside a MultiPage control. This is my markup code:
           <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" AutoPostBack="True">
                    <telerik:RadTab PageViewID="RadPageView1" Text="1" Selected="true">
                    <telerik:RadTab PageViewID="RadPageView2" Text="2">
            <telerik:RadMultiPage ID="RadMultiPage1" runat="server" RenderSelectedPageOnly="True">
                <telerik:RadPageView ID="RadPageView1" runat="server" Selected="true">
                    <telerik:RadFileExplorer ID="RadFileExplorer1" runat="server" Configuration-ViewPaths="/">
                <telerik:RadPageView ID="RadPageView2" runat="server">

    At the beginning everything seems fine, I can navigate the folder as shown in the attachment 1.jpg.
    But if I change the selected tab and then return to the FileExplorer tab, the FileExplorer Tree loses its state as shown in the attachment 2.jpg. The FileExplorer Grid mantains the selected folder, but de Tree collapses to its original state and loses the selected folder.

    I found a similar issue in the forums: But it doesn't provide a solution.

    BTW, I'm using Q1 2010.

  2. Dobromir
    Dobromir avatar
    1633 posts

    Posted 22 Feb 2011 Link to this post

    Hi Santiago,

    This behavior occurs because when RadMultiPage's RenderSelectedPageOnly property is set to false, RadFileExplorer is not registered on the page when different tab is selected, but the page stores information about the control in the ViewState.

    To avoid this issue you need to manually call RadFileExplorer's refresh() method in the OnClientLoad client-side event, e.g.:
    <telerik:RadFileExplorer ID="RadFileExplorer1" runat="server" Configuration-ViewPaths="~/" OnClientLoad="OnClientLoad">
    <script type="text/javascript">
        function OnClientLoad(explorer, args)

    I hope this helps.

    Best wishes,
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. Santiago
    Santiago avatar
    14 posts
    Member since:
    Dec 2006

    Posted 23 Feb 2011 Link to this post

    That did the trick!

Back to Top