1. #1
    Sencha User
    Join Date
    Jun 2011
    Location
    Bangalore, India
    Posts
    134
    Vote Rating
    1
    renganathan is on a distinguished road

      0  

    Default Unanswered: Expand particular accordion panel based on onclick event

    Unanswered: Expand particular accordion panel based on onclick event


    Hi all,

    I want to expand particular accordion panel based on onclick event ..


    can u guys help me out how to achieve this?
    Thanks,

    RENGANATHAN M G
    http://www.renganathan.net

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,641
    Vote Rating
    434
    Answers
    3106
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Can you get the panel you want to expand?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Mar 2009
    Posts
    356
    Vote Rating
    0
    Answers
    1
    koko2589 is on a distinguished road

      0  

    Default


    Code:
    items: [
        {
          title: 'A-E',
          id:'A-E',
          layout:'fit',
          collapsed: true
                 
        },
    
    //Ext.getCmp('A-E').collapse();//
    my ext js site
    http://www.itoto4.com/

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,641
    Vote Rating
    434
    Answers
    3106
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    1. Try not to set static ids
    2. You should be able to use expand/collapse on the child items. Just tested with 4.0.7 and it works.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    Mar 2009
    Posts
    356
    Vote Rating
    0
    Answers
    1
    koko2589 is on a distinguished road

      0  

    Default


    try this
    Code:
    title:'aaa',
         id:'devpanel',
         bodyStyle:'padding:10px',
         html:'bbb'
        },{
    /////adding an event listener to a ahref tag   
    Ext.EventManager.addListener("devsnippets", 'click', function(){
     Ext.getCmp('devpanel').expand();
    }, this, { preventDefault: true } );///
    <a href="#" id="devsnippets">expand</a>
    my ext js site
    http://www.itoto4.com/

Tags for this Thread