RadExplorer and AjaxControlToolKit TabPanel

2 posts, 1 answers
  1. Felipe Casanova
    Felipe Casanova avatar
    56 posts
    Member since:
    Feb 2010

    Posted 14 May 2010 Link to this post

    When I place the RadExplorer inside a TabPanel it doesn't seem to function properly, The right pane doesn't show the files properly until a refresh of the control is commited and the upload component works but does not upload anything.  If I take it out of the tabpanel everything functions as normal.  Any suggestions?
    Thanks
    Neville
  2. Answer
    Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 17 May 2010 Link to this post

    Hi Neville,

    In your case you need to manually call the repaint function of the RadGrid control which is embedded in RadFileExplorer control. You can achieve the desired result by using this approach:

    Example ASPX:
    <cc1:TabContainer ID="TabContainer" runat="server" AccessKey="0" OnClientActiveTabChanged="OnClientActiveTabChanged">
        <cc1:TabPanel ID="TabPanel1" TabIndex="0" runat="server">
            <HeaderTemplate>
                <div>
                    Panel 1 - no file explorer</div>
            </HeaderTemplate>
            <ContentTemplate>
                <div>
                    Panel 1</div>
            </ContentTemplate>
        </cc1:TabPanel>
        <cc1:TabPanel TabIndex="0" runat="server">
            <HeaderTemplate>
                <div>
                    Panel 1 - contains file explorer</div>
            </HeaderTemplate>
            <ContentTemplate>
                <telerik:RadFileExplorer runat="server" ID="RadFileExplorer1" Width="500px" Height="500px">
                    <Configuration ViewPaths="~/ROOT/" DeletePaths="~/ROOT/" UploadPaths="~/ROOT/" />
                </telerik:RadFileExplorer>
            </ContentTemplate>
        </cc1:TabPanel>
    </cc1:TabContainer>

    JS:
    <telerik:RadScriptBlock ID="RadScriptBlocl1" runat="server">
     
        <script type="text/javascript">
            function OnClientActiveTabChanged(oTabContainer, args)
            {
                var oFileExplorer = $find("<%= RadFileExplorer1.ClientID %>");
                oFileExplorer.get_grid().repaint();
            }
        </script>
     
    </telerik:RadScriptBlock>


    I hope this helps.

    Kind regards,
    Fiko
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top