Hi,
I am trying to extend Grid summary feature but it's throwing an error
PHP Code:
Uncaught TypeError: Cannot read property 'childNodes' of null
Here's the code sample, modified from http://docs.sencha.com/extjs/4.2.1/#...eature.Summary
PHP Code:
Ext.define('TestResult', { extend: 'Ext.data.Model', fields: ['student', { name: 'mark', type: 'int' }]});Ext.define('Ext.grid.feature.Summary2', { extend: 'Ext.grid.feature.Summary', alias: 'feature.summary2'});Ext.create('Ext.grid.Panel', { width: 400, height: 200, title: 'Summary Test', style: 'padding: 20px', renderTo: document.body, features: [{ ftype: 'summary2' }], store: { model: 'TestResult', data: [{ student: 'Student 1', mark: 84 }, { student: 'Student 2', mark: 72 }, { student: 'Student 3', mark: 96 }, { student: 'Student 4', mark: 68 }] }, columns: [{ dataIndex: 'student', text: 'Name', summaryType: 'count', summaryRenderer: function(value, summaryData, dataIndex) { return Ext.String.format('{0} student{1}', value, value !== 1 ? 's' : ''); } }, { dataIndex: 'mark', text: 'Mark', summaryType: 'average' }]});