PDA

View Full Version : More than 1 plugin???



flashed
9 Mar 2009, 2:58 AM
Hi all,


Can a use more than 1 plugin, in same .js file???
I pick up grid-filter example from SDK file, but i want to add expander plugin. When put the code of expander plugin, the filter disappears. Like this:



//Add Expander
var expander = new Ext.grid.RowExpander({
tpl : new Ext.Template(
'<p><b>Company:</b> {company}</p><br>',
'<p><b>Summary:</b> {size}</p>'
)
});
//

var cm = new Ext.grid.ColumnModel([
expander,
{dataIndex: 'id', header: 'Id'},
{dataIndex: 'company', header: 'Company', id: 'company'},
{dataIndex: 'price', header: 'Price'},
{dataIndex: 'date',header: 'Date', renderer: Ext.util.Format.dateRenderer('m/d/Y')},
{dataIndex: 'size', header: 'Size'},
{dataIndex: 'visible',header: 'Visible'}
]);
cm.defaultSortable = true;

var grid = new Ext.grid.GridPanel({
id: 'example',
title: 'Grid Filters Example',
ds: ds,
cm: cm,
enableColLock: false,
loadMask: true,
plugins: filters,
//plugins: expander, - not working
//plugins: filters, expander, - not working
height:400,
width:700,
el: 'grid-example',
autoExpandColumn: 'company',
bbar: new Ext.PagingToolbar({
store: ds,
pageSize: 15,
plugins: filters
})
});
grid.render();


Sorry i'm noob, can anyone tell me how i have to do?

benny00
9 Mar 2009, 3:02 AM
did you try: plugins:[filters,expander] ?

flashed
9 Mar 2009, 3:24 AM
Ok thanks, it works!!! I am ashamed, i have to read and research to learn

Ps: sorry my inexperience:">

benny00
9 Mar 2009, 3:18 PM
Ok thanks, it works!!! I am ashamed, i have to read and research to learn

Ps: sorry my inexperience:">

No problem. a good starting point is http://extjs.com/learn/

mjlecomte
9 Mar 2009, 3:48 PM
Or in this case, just carefully read the API:
http://extjs.com/deploy/dev/docs/?class=Ext.BoxComponent&member=plugins