dimanche 7 décembre 2014

Grouped grid not rendered in window second time

Hi,

I 'm migrating an application in Ext JS 4.1.1 to 5.0.1.

Following is a grouped grid that is included in one window.



Code:



{
xtype : 'gridpanel',
forceFit : true,
itemId : 'tag_rightgrid',
width : 200,
height : 300,
autoScroll : true,
hideHeaders : true,
store : Ext.getStore('XXX'),
features : [{
ftype : 'grouping',
groupHeaderTpl : '{name}'
}],
selModel : {
// selType : 'checkboxmodel',
mode : 'MULTI'
},
viewConfig : {
plugins : {
ptype : 'gridviewdragdrop',
dragGroup : 'secondGridDDGroup',
dropGroup : 'firstGridDDGroup'
},
listeners : {
drop : function(node, data, overRecord, dropPosition, options) {
Ext.getStore('XXX').sort([{
property : 'displayField',
direction : 'ASC'
}, {
property : 'value',
direction : 'ASC'
}]);
}
}
},
columns : [{
dataIndex : 'value',
width : 195,
filterable : true
},{..}

This renders perfectly for the first time. The second time I open the window, it throws an error saying:

Uncaught TypeError: Cannot read property 'ownerCt' of null

in onGroupChange method of Ext.grid.feature.Grouping , me.grid.ownerCt, the grid object is null.

Spent quite some time debugging it to find the issue.


following is the link of the fiddle in which I have tried out something similar

http://ift.tt/1zEePIX


It throws an error saying Uncaught TypeError: Cannot read property 'addCls' of null






Grouped grid not rendered in window second time

Aucun commentaire:

Enregistrer un commentaire