PDA

View Full Version : Multiple plugins for one grid.



AJuniorCoder
9 Sep 2008, 2:08 PM
I have been using extjs for about 1 day :D. I would like to use 2 plugins : Filters and RowExpander with my grid but I have not been able to find the syntax for declaring multiple plugins for one grid. Can someone help? Is it even possible?

var grid = new Ext.grid.GridPanel({
ds: ds,
cm: cm,
sm: new Ext.grid.RowSelectionModel({
singleSelect: true,
}),
height: 200,
title: '',
//plugins: filters,
plugins: expander,
bbar: pagingBar
});

ds.load({ params: { start: 0, limit: pagingSize} });
return grid;
}

Thanks.

mjlecomte
9 Sep 2008, 2:25 PM
As the API Docs indicate (http://extjs.com/deploy/dev/docs/?class=Ext.BoxComponent&member=plugins) you can specify an array of plugins:


plugins: [plugin1, plugin2, plugin3]

By the way:

Please post help questions in the help forum.
Post code inside code tags.
These things are explained in the FAQs by the way. There's a section on "Getting Help".

AJuniorCoder
9 Sep 2008, 3:08 PM
Thank you for your help. I apologize for unintentionally not following the forum rules/formats. Won't happen again :). Thanks.

mjlecomte
9 Sep 2008, 3:24 PM
No problem, you're new...there's lots of information around and I figured you may not have come across some of that yet so wanted to point it out.

A quick scan of the FAQs just to acquaint yourself what's in there may save you some time in the future.