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?
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?