PDA

View Full Version : [CLOSED] Grid - Cannot read property 'scroll' of undefined



LesJ
16 Jul 2015, 8:30 AM
Simple grid works in Ext JS 4, fails in Ext JS 5 and 6.

The following error results in Ext JS 5 and 6.

Uncaught TypeError: Cannot read property 'scroll' of undefined.

qk3

sauerli
24 Jul 2015, 12:25 AM
try Grid definition without the config .


Ext.define('MyGrid', {
extend: 'Ext.grid.Panel',

title: 'Simpsons',
store: Ext.data.StoreManager.lookup('simpsonsStore'),
columns: [
{ text: 'Name', dataIndex: 'name' },
{ text: 'Email', dataIndex: 'email', flex: 1 },
{ text: 'Phone', dataIndex: 'phone' }
],
height: 200,
width: 400

});

LesJ
24 Jul 2015, 2:38 AM
Thanks, I noticed a difference... but these are configs and the grid is configured properly as documented, so there should be no error.

evant
24 Jul 2015, 2:46 AM
Not everything in the "config" options is in the config block like in Touch. For classic, you should follow the usual extension pattern of putting them definitions on the class for existing properties.

menonv
30 Oct 2016, 12:55 PM
I came across the same problem. Looking at the other files in the project I was working on, I saw the the initComponent of the view had this as the last line
this.callParent(arguments);

Adding that to the initComponent of my view, solved my problem.