PDA

View Full Version : Expandable Panel



madhumita.254
31 Aug 2012, 2:23 AM
38373

How to get this expandable panel by using Ext-js 4.1

sword-it
31 Aug 2012, 2:52 AM
Hi,
you may try something as following with your panel:-



Ext.create('Ext.panel.Panel', {
title: 'Accordion Layout',
width: 300,
height: 300,
defaults: {
bodyStyle: 'padding:15px'
},
layout: {
type: 'accordion',
titleCollapse: false,
animate: true,
activeOnTop: true
},
items: [{
title: 'Panel 1',
html: 'Panel content!'
},{
title: 'Panel 2',
html: 'Panel content!'
},{
title: 'Panel 3',
html: 'Panel content!'
}],
renderTo: Ext.getBody()
});



Output:-
38377


take a look at accordion layout here.
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.layout.container.Accordion

madhumita.254
31 Aug 2012, 3:22 AM
How to Use Layout such as "type: 'accordion'" inside the grid,Because i am having my data in the below


format 38378

Please reply.

sword-it
31 Aug 2012, 3:25 AM
HI!

if you have to use this in the grid, in that case you may take a look on grouping grid here,
http://docs.sencha.com/ext-js/4-1/#!/example/grid/groupgrid.html