Results 1 to 4 of 4

Thread: Facing an issue an adding panel.

  1. #1

    Default Facing an issue an adding panel.

    Hi,
    I am using Extjs 6.2.1,
    I am facing an issue with panel.
    Adding the panel on clicking of button.
    But that panel was adding in the order like

    Panel6,
    Panel5
    Panel4
    Panel3
    Panel2
    Panel1.

    But i need the order like

    Panel1,
    Panel2
    Panel3
    Panel4
    Panel5
    Panel6.

    Here is my code.

    Panel Code.
    Code:
    Ext.define('TestCases.view.mainaccordian.TestSuiteAccordian', {
    	extend: 'Ext.panel.Panel',
        alias: 'widget.testsuiteaccordian',
    	width: '100%',
        height: '100%',
    	requires: ['TestCases.view.mainaccordian.CreateFeatureAccordian',
    				'TestCases.view.testcase.TestCaseForm'],
        defaults: {
            bodyStyle: 'padding:15px'
        },
        layout: {
            type: 'accordion',
            titleCollapse: true,
            animate: true
        },
    	itemId:'testsuiteaccordianItemId',
        items: [{
    			xtype: 'panel', // << fake hidden panel
    			hidden: true,
    			collapsed: false
    		},{
    			title:'Test Case 1',
    			items:[{
    				xtype:'testcase'
    			},{
    				xtype:'createfeatureaccordian'
    			}]
    	}]
    });

    //Add logic
    Code:
    var view	=	this.getView();
    var featureForm = 	Ext.create('TestCases.view.mainaccordian.TestSuiteAccordian');
    view.add(featureForm);
    Please help me in this.


    Thanks In Advance
    Kamalakar

  2. #2

    Default

    Hi..
    In the above case i removed itemId then it is coming like
    panle2
    panle3
    panel4
    panel5
    panel6
    .
    .
    .
    panle1


    In this i want the order of panels like
    1
    2
    3
    4
    5
    6


    Help me in this....

    Thanks
    Kamalakar

  3. #3
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379
    Answers
    3997

    Default

    There won't be any magical sorting when you use the add method, it'll simply add to the end of the items. You can use the insert method to control at what index to insert the panel:

    Code:
    view.insert(0, {
        xclass: 'TestCases.view.mainaccordian.TestSuiteAccordian'
    })
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  4. #4

    Default

    Thanks for your reply..
    Its working fine...

    Thanks
    Kamalakar

Similar Threads

  1. Facing an Issue with Tooltip in IE
    By kamalakarreddy vancha in forum Ext 5: Q&A
    Replies: 0
    Last Post: 15 May 2018, 5:56 AM
  2. Facing an Issue with Tooltip in IE
    By kamalakarreddy vancha in forum Ext 5: Q&A
    Replies: 0
    Last Post: 14 May 2018, 2:13 AM
  3. Replies: 4
    Last Post: 24 Sep 2015, 1:12 PM
  4. Facing an issue with Sencha Cmd
    By nitinlavania5 in forum Ext: Q&A
    Replies: 4
    Last Post: 24 Apr 2014, 4:51 AM
  5. Facing issue to show a window
    By niladri in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 9 Jun 2008, 10:21 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •