[r4842] CommandColumn/ComponentColumn are not destroyed correctly

  1. #1

    [r4842] CommandColumn/ComponentColumn are not destroyed correctly

    Hi,

    I'm using the Ext.Net 2.1 version.
    I have this problem concerning CommandColumn.

    Without changing version, have you got a work around to destroy correctly a CommandColumn?

    Thanks.
    Last edited by Yannis; Nov 21, 2013 at 3:15 AM.
  2. #2
    To complete the previous behavior, I tried with Ext.Net 2.3.1 : it is the same thing.

    In fact, I try to destroy a window that contains some tabs.
    When I load the window, I only see the first tab.
    I close the window and I have the error "this.grid is undefined" : line 17373 (debug mode)

    If I open each tabs before closing the window, I don't have the error.
    One of the hidden tab contains a grid with a command column.

    have I forgotten something?

    Thanks.
  3. #3
    Thanks, it is fixed already, you can use the following override to fix it
    Ext.grid.column.CommandColumn.override({
          destroy : function () {        var me = this,
                view = this.grid.getView();
    
    
            Ext.each(this.sharedMenus || [], function (menu) {
                if (menu) {
                    menu.destroy();
                }
            });
            delete this.shareMenus;
            
            this.removeToolbars();
    
    
            if (this.overToolbar) {
                this.overToolbar.destroy();
                delete this.overToolbar;
            }
    
    
            if (me.commands) {
                if (me.overOnly) {
                    me.view.un("beforerefresh", me.moveToolbar, me);
                    me.view.un("beforeitemupdate", me.moveToolbar, me);
                    me.view.un("beforeitemremove", me.moveToolbar, me);                
                    me.view.un("itemmouseenter", me.onItemMouseEnter, me);
                    me.view.un("itemmouseleave", me.onItemMouseLeave, me);
                } else {
                    me.view.un("beforerefresh", me.removeToolbars, me);
                    me.view.un("refresh", me.insertToolbars, me);
                    me.view.un("beforeitemupdate", me.removeToolbar, me);
                    me.view.un("beforeitemremove", me.removeToolbar, me);
                    me.view.un("itemadd", me.itemAdded, me);
                    me.view.un("itemupdate", me.itemUpdated, me);
                }
            }
            
            if (me.groupCommands) {            
                me.view.un("beforerefresh", me.removeToolbars, this);
                me.view.un("refresh", me.insertGroupToolbars, this);                
                me.mun(me.grid, "resize", me.onGridResize, me);            
                me.view.un('groupclick', me.groupToolbarClick);                      
            }
    
    
            if (me.grid.isTree || me.grid.ownerLockable && me.grid.ownerLockable.isTree) {
                me.grid.un("beforeitemcollapse", me.removeNodeToolbars, me._cnrScope);
                me.grid.un("beforeitemmove", me.removeNodeToolbars, me._crScope);
            }
    
    
            this.callParent(arguments);
        }
    });
  4. #4
    Hi Vlad,

    Ok, in my case, this code does not resolved my problem.
    In fact, the Grid Panel that contains the CommandColumn is in a Panel into a tab.
    While I don't click on the tab = don't display the content of this tab (the grid and so on) I have an error if I close the window.
    The error raises on the line 3 :
    view = this.grid.getView
    ==> because grid is undefined

    If I click on the tab to display its content, I can close the window because at this time : this.grid exists.

    Do you see what is my problem?
    Is there any work around?

    Thanks.

Similar Threads

  1. [CLOSED] treepanel tooltip not destroyed and shows on grid
    By RCM in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 12, 2013, 3:29 PM
  2. How to get the ComponentColumn's value?
    By kulolo in forum 2.x Help
    Replies: 2
    Last Post: Apr 16, 2013, 1:56 AM
  3. [CLOSED] ComponentColumn
    By canbay in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 10, 2012, 5:26 PM
  4. [CLOSED] SplitCommand shared menu destroyed on store load
    By r_honey in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Apr 25, 2012, 6:26 PM
  5. [CLOSED] Desktop windows not destroyed on closing
    By SymSure in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 30, 2012, 7:04 PM

Posting Permissions