View Full Version : Grid feature grid property returns wrong grid

whirling dervish
27 Feb 2013, 1:47 PM
So I am trying to implemented a grid feature that needs to listen to the grid reconfigure event,

var grid = this.grid;

reconfigure : function(grid, store) {
// do stuff

And what I am seeing is that this.grid is giving me the wrong grid. It gives me a Ext.grid.Panel instead of my extended custom grid panel.

I was looking through the ExtJS code and I can't figure out where this grid property is set, and why it is giving me the wrong grid.

Can anyone help me out?

whirling dervish
27 Feb 2013, 1:57 PM
Ah I found where the grid is configured in Ext.panel.Table,

This at line 713,

* Gets the view for this panel.
* @return {Ext.view.Table}
getView: function() {
var me = this,

if (!me.view) {
sm = me.getSelectionModel();
me.view = Ext.widget(Ext.apply({}, me.viewConfig, {

// Features need a reference to the grid, so configure a reference into the View
grid: me,
deferInitialRefresh: me.deferRowRender !== false,
scroll: me.scroll,
xtype: me.viewType,
store: me.store,
headerCt: me.headerCt,
selModel: sm,
features: me.features,
panel: me,
emptyText : me.emptyText ? '<div class="' + me.emptyCls + '">' + me.emptyText + '</div>' : ''

Not sure how I could fix it, but at least I know where it is being set

whirling dervish
4 Mar 2013, 8:16 AM
Anyone have any insight?