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

FileExplorer Tree loses state within a MultiPage with RenderSelectedPageOnly=True

2 Answers 51 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Santiago
Top achievements
Rank 1
Santiago asked on 16 Feb 2011, 08:42 PM
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">
            <Tabs>
                <telerik:RadTab PageViewID="RadPageView1" Text="1" Selected="true">
                </telerik:RadTab>
                <telerik:RadTab PageViewID="RadPageView2" Text="2">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
        <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:RadFileExplorer>
            </telerik:RadPageView>
            <telerik:RadPageView ID="RadPageView2" runat="server">
                2
            </telerik:RadPageView>
        </telerik:RadMultiPage>

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: http://www.telerik.com/community/forums/aspnet-ajax/file-explorer/control-gets-malformed-when-inside-radpageview-with-renderselectedpageonly-set.aspx. But it doesn't provide a solution.

BTW, I'm using Q1 2010.

Greetings,
Santiago.

2 Answers, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 22 Feb 2011, 09:55 AM
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">
</telerik:RadFileExplorer>
<script type="text/javascript">
    function OnClientLoad(explorer, args)
    {
        explorer.refresh();
    }
</script>

I hope this helps.

Best wishes,
Dobromir
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!
0
Santiago
Top achievements
Rank 1
answered on 23 Feb 2011, 05:13 PM
That did the trick!

Thanks,
Santiago.
Tags
FileExplorer
Asked by
Santiago
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Santiago
Top achievements
Rank 1
Share this question
or