1. #51
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    4
    mystix will become famous soon enough

      0  

    Default


    Quote Originally Posted by moegal View Post
    I changed it the following to get it to work:

    Code:
    if(typeof(this.colMenu.getEl())!="undefined"){ 
         if (this.colMenu.getEl()) this.colMenu.getEl().remove();
    }
    //this.colMenu.getEl().remove();
    Thanks, Marty
    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;
            }
        }

  2. #52
    Sencha User
    Join Date
    Mar 2008
    Posts
    566
    Vote Rating
    0
    moegal is on a distinguished road

      0  

    Default


    mystix,

    thanks but then I get another error after i use the menu and then close it

    me.dom has no properties

    Thanks, Marty

  3. #53
    Sencha User
    Join Date
    Mar 2008
    Posts
    566
    Vote Rating
    0
    moegal is on a distinguished road

      0  

    Default


    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

  4. #54
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    4
    mystix will become famous soon enough

      0  

    Default


    @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?

  5. #55
    Sencha User
    Join Date
    Mar 2008
    Posts
    566
    Vote Rating
    0
    moegal is on a distinguished road

      0  

    Default


    That may be it. I am giving each grid a unique name and id though:

    Code:
    var grid1 = new Ext.grid.GridPanel({
    id: 'grid1panel',
    store: gridstore1,
    plugins:[
    new Ext.ux.grid.GridViewMenuPlugin()
    ],
    enableHdMenu: true,
    ...
    AND
    Code:
    var grid2 = new Ext.grid.GridPanel({
    id: 'grid2panel',
    store: gridstore2,
    plugins:[
    new Ext.ux.grid.GridViewMenuPlugin()
    ],
    enableHdMenu: true,
    ...
    Am I doing this wrong? Should I be assigning each plug-in to a var 1st?

    Thanks, Marty

  6. #56
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    4
    mystix will become famous soon enough

      0  

    Default


    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.

  7. #57
    Sencha User
    Join Date
    Mar 2008
    Posts
    566
    Vote Rating
    0
    moegal is on a distinguished road

      0  

    Default


    let me check the version, must be something to do with that.

    thanks, Marty

  8. #58
    Sencha User
    Join Date
    Feb 2008
    Posts
    155
    Vote Rating
    0
    WixSL is on a distinguished road

      0  

    Default


    The plugin stop working with Ext 3.3.0 beta.
    Clicking a menu item result in the following error:

    Code:
    this.config[col] is undefined (on GridView.getDataIndex)
    This is because GridView.hdCtxIndex doesn't get set.
    Probably because GridView._handleHdDown gets fired before GridView.handleHdDown.

  9. #59
    Sencha User
    Join Date
    Feb 2008
    Posts
    155
    Vote Rating
    0
    WixSL is on a distinguished road

      0  

    Default


    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. #60
    Sencha User
    Join Date
    Apr 2009
    Location
    / .de / ST / HAL
    Posts
    33
    Vote Rating
    0
    Matthias_WB is on a distinguished road

      0  

    Default


    The fix working fine under ExtJS3.30..
    Thank you very much!
    Best regards

    Matthias

    _______________
    ExtJS is the best ajax-framework, that I know!

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar