1. #1
    Ext User
    Join Date
    Aug 2008
    Posts
    107
    Vote Rating
    0
    bhaskar1605 is on a distinguished road

      0  

    Default 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.

  2. #2
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    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

  3. #3
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    BTW, what is with the vague and/or theorhetical questions?

  4. #4
    Ext User
    Join Date
    Aug 2008
    Posts
    107
    Vote Rating
    0
    bhaskar1605 is on a distinguished road

      0  

    Default 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.

  5. #5
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    6
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    Unless you're altering the class itself, I'd suggest using a factory.

    Wherever you want your widget you put:

    Code:
    getWidget({
       /*custom widget configs here*/
    });
    and you have a factory somewhere before that:
    Code:
    getWidget = function (config) {
       //alter, preconfigure, etc.
       return new Widget(modifiedConfigObject);
    };