View Full Version : Problem when displaying multiple editable grids

16 Aug 2012, 6:51 AM
I'm using Ext 4.0.1 version.

I have a pop-up window in which I am displaying four editable grids. The data is loaded into the grids, but I have a problem when trying to edit the data.

This problem I can not reproduce when working on localhost, but as soon as I deploy on server, I get stacked. I don't get this error on Mozila, only on Chrome (version 21.0.1180.77 m).

The problem is with rendering the buttons from the editing plugin. The error that I'm getting is 'Uncaught TypeError: Cannot call method 'on' of undefined'.

Also, some of the grids sometimes are working, but sometimes don't, and sometimes all the grids are working. The state may change as soon as a made refresh on the page.

As i debugged, the problem I am founding is when

// private
initEditor: function() {
var me = this,
grid = me.grid,
view = me.view,
headerCt = grid.headerCt;

return Ext.create('Ext.grid.RowEditor', {
autoCancel: me.autoCancel,
errorSummary: me.errorSummary,
fields: headerCt.getGridColumns(),
hidden: true,

// keep a reference..
editingPlugin: me,
renderTo: view.el

the property renderTo: view.el is the problem, because the el attribute from the view doesn't exist, but I cannot find when this view got created.

Anyone have similar problem, or give a hint what I can try do avoid this?

16 Aug 2012, 2:44 PM
You will need to provide info about your setup for us to help. It could be you are referencing the same editor instance for each grid? or you have a duplicate id ..


16 Aug 2012, 11:58 PM
I found a workaround.

I think the problem was with the speed of rendering the pop-up with the grids, and sometimes some parts were not as should be rendered when the pop - up is shown on click.

So the workaround was, when first time come on the page, I am making show/hide of the pop-up window. And later on click, when the data got loaded in the grids, only show the pop-up.

I am not sure why it happens like this, but this workaround gave me the result I was expecting.

Either way, thanks