-
24 Jan 2010 9:44 AM #51
i believe it should be sufficient to simply change that to
Code:_destroy : function() { if (this.colMenu) { this.colMenu.removeAll(); Ext.menu.MenuMgr.unregister(this.colMenu); Ext.destroy(this.colMenu); // this.colMenu.el.remove(); delete this.colMenu; } if (this._menuBtn) { Ext.destroy(this._menuBtn); // this._menuBtn.remove(); delete this._menuBtn; } }
Sencha Docs / Ext 3.x - ( Docs | Examples )
Learning Center / Saki's Examples (for 2.x) / HOWTO - ( Report Bugs | Post Proper Code )
-
24 Jan 2010 10:08 AM #52
mystix,
thanks but then I get another error after i use the menu and then close it
me.dom has no properties
Thanks, Marty
-
24 Jan 2010 5:33 PM #53
mystix,
I spoke too soon. I am not getting the error now but I cannot reopen the menu after it has been closed.
For example I have a tab with a grid. I open the tab, display the grid and open the gridviewmenu. I close the tab. I reopen the tab and I cannot access the gidviewmenu. on this or any other gid in any tab.
Thanks,
Marty
-
25 Jan 2010 7:35 AM #54
@moegal: sounds like you're attempting to reuse a single instance of this plugin with multiple grids. got a link to a test page somewhere where i can take a look?
Sencha Docs / Ext 3.x - ( Docs | Examples )
Learning Center / Saki's Examples (for 2.x) / HOWTO - ( Report Bugs | Post Proper Code )
-
25 Jan 2010 7:56 AM #55
That may be it. I am giving each grid a unique name and id though:
ANDCode:var grid1 = new Ext.grid.GridPanel({ id: 'grid1panel', store: gridstore1, plugins:[ new Ext.ux.grid.GridViewMenuPlugin() ], enableHdMenu: true, ...
Am I doing this wrong? Should I be assigning each plug-in to a var 1st?Code:var grid2 = new Ext.grid.GridPanel({ id: 'grid2panel', store: gridstore2, plugins:[ new Ext.ux.grid.GridViewMenuPlugin() ], enableHdMenu: true, ...
Thanks, Marty
-
25 Jan 2010 10:09 AM #56
you're doing the right thing -- i.e. creating a new plugin instance for each unique grid.
can't tell what's wrong from the code you posted though.
Sencha Docs / Ext 3.x - ( Docs | Examples )
Learning Center / Saki's Examples (for 2.x) / HOWTO - ( Report Bugs | Post Proper Code )
-
25 Jan 2010 10:24 AM #57
let me check the version, must be something to do with that.
thanks, Marty
-
4 Aug 2010 6:24 AM #58
The plugin stop working with Ext 3.3.0 beta.
Clicking a menu item result in the following error:
This is because GridView.hdCtxIndex doesn't get set.Code:this.config[col] is undefined (on GridView.getDataIndex)
Probably because GridView._handleHdDown gets fired before GridView.handleHdDown.
-
15 Aug 2010 10:02 AM #59
I've fixed this by initializing the hdCtxIndex attribute.
Code:init : function(grid){ if(grid.enableHdMenu === true){ throw("Ext.ux.grid.GridViewMenuPlugin - grid\"s \"enableHdMenu\" property has to be set to \"false\""); } this._view = grid.getView(); this._view.initElements = this._view.initElements.createSequence(this.initElements,this); this._view.initData = this._view.initData.createSequence(this.initData,this); this._view.destroy = this._view.destroy.createInterceptor(this._destroy,this); this._view.hdCtxIndex = 0; this.colMenu = new Ext.menu.Menu(); this.colMenu.on("beforeshow", this._beforeColMenuShow, this); this.colMenu.on("itemclick", this._handleHdMenuClick, this); }
-
10 Nov 2010 3:28 AM #60
The fix working fine under ExtJS3.30..
Thank you very much!Best regards
Matthias
_______________
ExtJS is the best ajax-framework, that I know!



Reply With Quote