[CLOSED] Problem with autoloading inner panel of tab

  1. #1

    [CLOSED] Problem with autoloading inner panel of tab

    I have a user control that I'm trying to embed in a tab panel. The user control is basically just a panel that autoloads a page. If I squash this into a single page and remove the extraneous panel, it seems to work, but this way, it doesn't. Here's a sample that illustrates it.

    <script runat="server">
    
        Protected Sub TheButton_Click(sender As Object, e As DirectEventArgs)
            With ThePanel.AutoLoad
                .Url = "http://google.com"
                .Mode = LoadMode.IFrame
                .ShowMask = True
                .NoCache = True
            End With
            Tabs.SetActiveTab(TheTab)
        End Sub
        
    </script>
    
    <ext:TabPanel ID="Tabs" runat="server">
        <Items>
            <ext:Panel runat="server" Title="First Tab">
                <TopBar>
                    <ext:Toolbar runat="server">
                        <Items>
                            <ext:Button runat="server" Text="Setup AutoLoad Tab" OnDirectClick="TheButton_Click" />
                        </Items>
                    </ext:Toolbar>
                </TopBar>
            </ext:Panel>
            <ext:Panel ID="TheTab" runat="server" Title="AutoLoad Tab" Layout="FitLayout">
                <Content>
                    <!-- This is where the user control is -->
                    <ext:FitLayout runat="server">
                        <Items>
                            <ext:Panel ID="ThePanel" runat="server" Layout="FitLayout" AutoScroll="true" />
                        </Items>
                    </ext:FitLayout>
                </Content>
            </ext:Panel>
        </Items>
    </ext:TabPanel>
    Last edited by Daniil; Nov 05, 2012 at 3:29 PM. Reason: [CLOSED]
  2. #2
    Hi @jmcantrell,

    The TabPanel should have some height. Also please call a LoadContent method after the SetActiveTab call.
    Tabs.SetActiveTab(TheTab)
    ThePanel.LoadContent()
  3. #3
    Hmm. Yeah, I had .LoadContent() in my "real" page, but I was getting a javascript error when it was trying to call getLayout() on the panel. I don't think I can produce a sample that will get that, but is it possible that the page that is being autoloaded could conflict with that?
  4. #4
    For some reason, it didn't apply to this example, but taking Layout="FitLayout" off of the inner panel fixed the issue for my "real" page.
  5. #5
    It is hard to say what can be wrong without a sample to reproduce. We would be happy to investigate a sample if you could provide.

    By the way, it doesn't make sense to set Layout="FitLayout" and AutoScroll="true" at the same time. FitLayout stretches a content up to a container. But AutoScroll needs that a content size exceeds a container size.

    Also I think that Layout="FitLayout" doesn't affect on a loaded iframe. But, anyway, it should not cause an error.

Similar Threads

  1. [CLOSED] How to reset panel when autoloading a partialview
    By jlosi in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: May 09, 2012, 4:41 PM
  2. Replies: 0
    Last Post: Jul 01, 2011, 2:49 PM
  3. grid Panel problem
    By Egale in forum 1.x Help
    Replies: 0
    Last Post: Jun 22, 2011, 11:26 AM
  4. [CLOSED] Autoloading content in a static position
    By craig2005 in forum 1.x Legacy Premium Help
    Replies: 12
    Last Post: Mar 18, 2011, 1:03 PM
  5. Replies: 0
    Last Post: Mar 02, 2011, 8:06 AM

Posting Permissions