Results 1 to 6 of 6

Thread: Accessing Grid Plugins

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

    Default 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 User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364
    Vote Rating
    85
      0  

    Default

    that's the only way to do it.

  3. #3
    Sencha User
    Join Date
    Aug 2008
    Posts
    111
    Vote Rating
    0
      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
      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
    Bédoin/Redwood City
    Posts
    30,644
    Vote Rating
    62
      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.
    Longtime Sencha geek. Outspoken advocate of pure Javascript Views. Posts my own opinions.

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

    Default

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •