PDA

View Full Version : Getting an ERROR when trying to implement the RowExpander



macdoug1
23 Oct 2012, 10:36 AM
Cannot call method 'insert' of undefined - says this is on line 126 of the RowExpander.js. I'm following the example from the sencha website for extjs.


Ext.Loader.setPath('Ext.ux.RowExpander', './js/Ext.ux.RowExpander.js');Ext.define('AM.view.bundle-issues-grid' ,{
requires:['Ext.ux.RowExpander'],
extend: 'Ext.grid.Panel',
alias : 'widget.bundleissues',

store:'bundleissues-store',

enableLocking:true,
width:'100%',
height:'100%',
plugins:[{
ptype: 'rowexpander',
rowBodyTpl: new Ext.XTemplate(
'<p><b>Issues:</b> {issues}</p>',
{
formatChange: function(v){

}

})
}],
collapsible:true,
animCollapse: false,
iconCls: 'icon-grid',
margin: '0 0 20 0',

initComponent: function() {
this.columns = [
{text: 'ULN', flex:1, dataIndex:'uln'},
{text: 'Unit Name', dataIndex:'unitname'},
{text: 'Origin', dataIndex:'origin'},
{text: 'POE', dataIndex:'poe'},
{text: 'POD', dataIndex:'pod'},
{text: 'Destination', dataIndex:'destination'},
{text: 'RLD', renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex:'rld'},
{text: 'ALD', renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex:'ald'},
{text: 'EAD', renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex:'ead'},
{text: 'LAD', renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex:'lad'},
{text: 'RDD', renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex:'rdd'},
{text: 'SQFT', dataIndex:'sqft'},
{text: 'SSF', dataIndex: 'ssf'},
{text: 'CCD', dataIndex:'ccd'},
{text: 'Bundle Name', dataIndex:'bundlename'}
];
this.callParent(arguments);
}
});


So if I'm doing something wrong what is it? Cause it is failing to draw anything on the screen due to this error. Any help is greatly appreciated.Thanks!

mitchellsimoens
25 Oct 2012, 6:28 AM
The rowBodyTpl, try just specifying a config. Past that, visually things look ok.

Also, it's not enough to give line number for the error, need the Ext JS 4 version as in checking 4.1.2 this is line 126:


me.view = grid.getView();

macdoug1
5 Nov 2012, 11:13 PM
Can anyone provide some help here? I'm not sure what exactly it doesn't like to get this RowExpander to work. I tried providing a config but maybe I'm not sure what exactly he meant by it. Anyway any help would be appreciated.

Also if I'm in the wrong place for questions, I'm sorry - but wanted to responde to this thread since I already started it.