-
19 Dec 2008 6:35 AM #1
Creating grid as generic...
Creating grid as generic...
Hi,
I have a requirement like that i have one grid its columns are same but data is different ,
so i want to use these grid in my different panels of same page(grid structure is same),
for this i will pass different store values to this grid, from this grid i would like to get data
based on the store values. so how we can create grid generic and how we can pass
these store values to that grid. please can you give any info. or any example(if possibe).
Thanks,
Bhaskar.
-
19 Dec 2008 7:08 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,169
- Vote Rating
- 28
On easy way is to extend the grid to 'pre configure' it for what you need, then pass a dynamic store. ... though Nige may disagree


Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.
-
19 Dec 2008 7:09 AM #3Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,169
- Vote Rating
- 28
BTW, what is with the vague and/or theorhetical questions?

Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.
-
20 Dec 2008 4:19 AM #4
any example...
any example...
Hi,
Can you give any example for creating one grid(with different datastores) and using that grid in panel for multiple times.
I am greatful to u if you give this examples.
Thanks,
Bhaskar.
-
20 Dec 2008 7:28 AM #5
Unless you're altering the class itself, I'd suggest using a factory.
Wherever you want your widget you put:
and you have a factory somewhere before that:Code:getWidget({ /*custom widget configs here*/ });
Code:getWidget = function (config) { //alter, preconfigure, etc. return new Widget(modifiedConfigObject); };MJ
API Search || Ext 3: docs-demo-upgrade guide || User Extension Repository
Frequently Asked Questions: FAQs
Tutorial: Grid (php/mysql/json) , Application Design and Structure || Extensions: MetaGrid, MessageWindow


Reply With Quote