[CLOSED] Accordion ActiveIndex

  1. #1

    [CLOSED] Accordion ActiveIndex

    Hi
    When working with the Accordion Layout, setting Collapsed = true/false in Markup, or setting ActiveIndex in code-behind are not working.

    Adrian.
    Last edited by geoffrey.mcgill; Apr 13, 2012 at 11:54 PM. Reason: [CLOSED]
  2. #2
    Hi,

    A panel you wish to be expanded should have
    collapsed : false
    explicitly on client.

    But we don't render
    Collapsed="false"
    because it's be default.

    We should review it to support AccordionLayout.

    For now, you can set up the "collapsed" config option via CustomConfig.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Panel 
                runat="server" 
                Width="500" 
                Height="500" 
                Layout="AccordionLayout">
                <Items>
                    <ext:Panel 
                        runat="server" 
                        Title="Panel 1" 
                        BodyStyle="background-color: green;" />
                    <ext:Panel 
                        runat="server" 
                        Title="Panel 2" 
                        BodyStyle="background-color: yellow;">
                        <CustomConfig>
                            <ext:ConfigItem Name="collapsed" Value="false" Mode="Raw" />
                        </CustomConfig>    
                    </ext:Panel>
                </Items>
            </ext:Panel>
        </form>
    </body>
    </html>
  3. #3
    Thanks for the explanation Daniil.

    Adrian.
  4. #4
    With the latest Ext.NET sources (SVN trunk and the next release v2.2) it is possible to replace
    <ext:Panel
        runat="server"
        Title="Panel 2"
        BodyStyle="background-color: yellow;">
        <CustomConfig>
            <ext:ConfigItem Name="collapsed" Value="false" Mode="Raw" />
        </CustomConfig>   
    </ext:Panel>
    with
    <ext:Panel
        runat="server"
        Title="Panel 2"
        BodyStyle="background-color: yellow;"
        Collapsed="false" />

Similar Threads

  1. Replies: 5
    Last Post: Nov 11, 2010, 7:33 PM
  2. set activeindex in card layout
    By maxdiable in forum 1.x Help
    Replies: 2
    Last Post: Jun 28, 2010, 10:51 AM
  3. [CLOSED] Scroll in accordion?
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 23, 2009, 10:12 AM
  4. [CLOSED] Accordion KeepActive
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 23, 2009, 8:15 AM
  5. [CLOSED] Accordion Question
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Mar 16, 2009, 10:39 PM

Posting Permissions