If you are using widget column (Ext.grid.column.Widget class) with content grid you will get error “Uncaught TypeError: Cannot read property ‘isModel’ of null” on clicking on the cell of the child grid.

 

To solve this problem you will need the following override the ‘Ext.grid.CellContext’ class. This bug takes place in ExtJs versions 6.0 – 6.3. Put the following override in ‘/override/grid/CellContext.js’ file and rebuild your project.

Ext.define('override.grid.CellContext', {
    override: 'Ext.grid.CellContext',
    
        setRow: function(row) {
        var me = this,
            dataSource = me.view.dataSource,
            oldRecord = me.record,
            count;
        
        if (row !== undefined && row !== null) {
            // Row index passed, < 0 meaning count from the tail (-1 is the last, etc) 
            if (typeof row === 'number') {
                count = dataSource.getCount();
                row = row < 0 ? Math.max(count + row, 0) : Math.max(Math.min(row, count - 1), 0);
                
                me.rowIdx = row;
                me.record = dataSource.getAt(row);
            }
            // row is a Record 
            else if (row.isModel) {
                me.record = row;
                me.rowIdx = dataSource.indexOf(row);
            }
            // row is a grid row, or Element wrapping row 
            else if (row.tagName || row.isElement) {
                me.record = me.view.getRecord(row);
 
                // If it's a placeholder record for a collapsed group, index it correctly 
                me.rowIdx = me.record ? (me.record.isCollapsedPlaceholder ? dataSource.indexOfPlaceholder(me.record) : dataSource.indexOf(me.record)) : -1;
            }
        }
        if (me.record !== oldRecord) {
            me.generation++;
        }
        return me;
    },
    
    setColumn: function(col) {
        var me = this,
            colMgr = me.view.getVisibleColumnManager(),
            oldColumn = me.column;
 
        // Maintainer: 
        // We MUST NOT update the context view with the column's view because this context 
        // may be for an Ext.locking.View which spans two grid views, and a column references 
        // its local grid view. 
        if (col !== undefined && col !== null) {
            if (typeof col === 'number') {
                me.colIdx = col;
                me.column = colMgr.getHeaderAtIndex(col);
            } else if (col.isHeader) {
                me.column = col;
                // Must use the Manager's indexOf because view may be a locking view 
                // And Column#getVisibleIndex returns the index of the column within its own header. 
                me.colIdx = colMgr.indexOf(col);
            }
        }
        if (me.column !== oldColumn) {
            me.generation++;
        }
        return me;
    }
});

 

Working sample: