[OPEN] [#342] [MVC] Accordion Render

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] [#342] [MVC] Accordion Render

    Hi guys,

    I have an accordion panel with 2 panel.
    a panel with one button and an empty panel hidden.

    If, when i click on this button and second panel just show, i expand my second panel, there is no problem.
    If, when i click on this button and second panel just show, i click twice on button for hide then show second panel, the second panel expand is only half of the accordion (i join the screen for this)

    TestView


    @using Ext.Net;
    @using Ext.Net.MVC;
    
    @Html.X().ResourceManager(ViewBag.ManagerConfig as MvcResourceManagerConfig)
    
    <script type="text/javascript">
        var testShowPanel = function () {
            if (Ext.getCmp('PanelSite').hidden) Ext.getCmp('PanelSite').show();
            else Ext.getCmp('PanelSite').hide();
        }
    </script>
    
    @(
     Html.X().Viewport()
        .Layout(LayoutType.Fit)
        .Items(
            Html.X().Panel()
            .ID("AccordionPanel")
            .Layout(LayoutType.Accordion)
            .ButtonAlign(Alignment.Center)
            .Items(
                Html.X().Panel()
                .Items(
                    Html.X().Button()
                    .ID("PanelSelection")
                    .Text("test")
                    .Listeners(p =>
                        {
                            p.Click.Fn = "testShowPanel";
                        })
                )
                ,
                Html.X().Panel()
                .ID("PanelSite")
                .Title("SiteTitle"))
                .Layout(LayoutType.Fit)
                .Hidden(true)
            )
            .Buttons(
                Html.X().Button()
                .ID("ButStartConfig")
                .Text("Lancer")
                .Hidden(true)
            )
        )
    )
    Click image for larger version. 

Name:	AccordionLayout.png 
Views:	10 
Size:	3.1 KB 
ID:	6852

    Regards
    Last edited by Tactem; Sep 06, 2013 at 9:08 AM.
  2. #2
    Hi @Tactem,

    The test case throws the following for me:

    Compiler Error Message: CS1061: 'Ext.Net.Viewport.Builder' does not contain a definition for 'Buttons' and no extension method '
  3. #3
    it's the same problem for another post

    .Title("SiteTitle"))
    right code

    @using Ext.Net;
    @using Ext.Net.MVC;
    
    @Html.X().ResourceManager(ViewBag.ManagerConfig as MvcResourceManagerConfig)
    
    <script type="text/javascript">
        var testShowPanel = function () {
            if (Ext.getCmp('PanelSite').hidden) Ext.getCmp('PanelSite').show();
            else Ext.getCmp('PanelSite').hide();
        }
    </script>
    
    @(
     Html.X().Viewport()
        .Layout(LayoutType.Fit)
        .Items(
            Html.X().Panel()
            .ID("AccordionPanel")
            .Layout(LayoutType.Accordion)
            .ButtonAlign(Alignment.Center)
            .Items(
                Html.X().Panel()
                .Items(
                    Html.X().Button()
                    .ID("PanelSelection")
                    .Text("test")
                    .Listeners(p =>
                        {
                            p.Click.Fn = "testShowPanel";
                        })
                )
                ,
                Html.X().Panel()
                .ID("PanelSite")
                .Title("SiteTitle")
                .Layout(LayoutType.Fit)
                .Hidden(true)
            )
            .Buttons(
                Html.X().Button()
                .ID("ButStartConfig")
                .Text("Lancer")
                .Hidden(true)
            )
        )
    )
  4. #4
    Thank you.

    Weird behavior. We will try to come up with a workaround.

    For now I reported it to Sencha.
    http://www.sencha.com/forum/showthread.php?271406
  5. #5
    thanks Daniil
  6. #6
    Sencha opened a bug. We created an Issue to track it.
    https://github.com/extnet/Ext.NET/issues/342

    Workaround
    Ext.layout.container.Accordion.override({
        onComponentShow: Ext.emptyFn
    });

Similar Threads

  1. Replies: 9
    Last Post: Aug 30, 2013, 10:11 AM
  2. Replies: 0
    Last Post: Aug 23, 2013, 11:16 AM
  3. [CLOSED] Toggle Render? Refresh Render?
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 08, 2011, 3:13 PM
  4. Replies: 5
    Last Post: Nov 11, 2010, 7:33 PM
  5. [CLOSED] Accordion render problem?
    By MrMp3 in forum 1.x Help
    Replies: 3
    Last Post: Sep 18, 2008, 11:46 AM

Tags for this Thread

Posting Permissions