1. #1
    Ext User tomhoag's Avatar
    Join Date
    Mar 2010
    Location
    Detroit, MI
    Posts
    17
    Vote Rating
    0
    tomhoag is on a distinguished road

      0  

    Default Accessing Grid Plugins

    Accessing Grid Plugins


    What is the appropriate way to determine what plugins a grid might be using?

    For now, I'm doing the following, but I'm accessing undocumented properties. Is this OK? or is there a better way to go about this?

    PHP Code:
    // if this grid is using a  filter plugin, clear the filters   
      
    if(Ext.isDefined(this.plugins)  && Ext.isArray(this.plugins)) { 
        
    Ext.each(this.plugins, function(itemindexallItems) { 
        if(
    item.constructor.ptype == "gridfilters"
          
    item.clearFilters(); 
        },  
    this); 
      } 
    --
    Tom Hoag
    Cluebucket Software
    www.cluebucket.com

  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


    that's the only way to do it.

  3. #3
    Sencha User
    Join Date
    Aug 2008
    Posts
    110
    Vote Rating
    0
    Rothariger is on a distinguished road

      0  

    Default


    just a little improvement.

    Code:
    if(Ext.isDefined(this.plugins)  && Ext.isArray(this.plugins)) { 
        Ext.each(this.plugins, function(item, index, allItems) { 
        if(item instanceof Ext.ux.plugin.whatever) 
          item.clearFilters(); 
        },  this); 
      } 
    


  4. #4
    Ext User tomhoag's Avatar
    Join Date
    Mar 2010
    Location
    Detroit, MI
    Posts
    17
    Vote Rating
    0
    tomhoag is on a distinguished road

      0  

    Default


    Great. Thanks!
    --
    Tom Hoag
    Cluebucket Software
    www.cluebucket.com

  5. #5
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    57
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    I think this is a neglected requirement, and something should be put into the library.

    I have a findPlugins method somewhere at my home office. If you bump this thread later, I'll look it up.

  6. #6
    Ext User tomhoag's Avatar
    Join Date
    Mar 2010
    Location
    Detroit, MI
    Posts
    17
    Vote Rating
    0
    tomhoag is on a distinguished road

      0  

    Default


    Bumping to remind Animal . . .
    --
    Tom Hoag
    Cluebucket Software
    www.cluebucket.com