Results 1 to 2 of 2

Thread: Re-init a plugin when a grid reconfigures

  1. #1
    Ext JS Premium Member
    Join Date
    Feb 2009
    Posts
    487
    Answers
    4

    Default Re-init a plugin when a grid reconfigures

    Here's a fiddle with a test case: https://fiddle.sencha.com/#fiddle/m63

    You will note that on first load, the grid has data in the first column. The requirement is to have the plugin reinitialise itself correctly when the grid is reconfigured with a new set of columns. You can test that in the fiddle by clicking the toolbar buttons to change the column definition. Note that when you use the toolbar buttons to reconfigure the grid columns, the first column goes blank. This is because the plugin doesn't re-init itself.

    So how can we make sure that a grid that uses a plugin like this, re-init's it's plugin when the grid columns reconfigure?

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,392
    Answers
    3997

    Default

    The grid will fire the reconfigure event that your plugin can listen to to do whatever it needs to do.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

Similar Threads

  1. TypeError: plugin.init is not a function
    By oloweczek in forum Ext: Discussion
    Replies: 2
    Last Post: 14 Aug 2014, 12:38 AM
  2. RowEditor plugin.init
    By Stefan F. in forum Ext: Discussion
    Replies: 0
    Last Post: 8 Mar 2011, 8:24 AM
  3. Ext.grid.GridPanel Plugins - plugin.init is not a function
    By PV-Patrick in forum Ext: Discussion
    Replies: 4
    Last Post: 5 Mar 2011, 2:38 PM
  4. How to init groupHeader plugin after reconfigure gridpanel
    By wguo in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 5 Apr 2010, 5:29 PM
  5. Plugin Init Code: Adding a toolbar to a panel
    By brookd in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 5 Sep 2008, 10:49 AM

Posting Permissions

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