View Full Version : Error when closing the window

28 Dec 2009, 6:16 AM
I'm trying to close the window with the grid when grid's rowdblclick event is fired. Here is the code:

var memRegGrid = new Ext.grid.GridPanel({
id: "memRegGrid",
/* code */
listeners: {
rowdblclick: function () {
/* code */

var regWindow = new Ext.Window({
id: "regWindow",
items: memRegGrid
}); It works but Firebug shows an error:

this.view is null
this.view.processEvent(name, e);

This function is called in the processEvent function of the GridPanel class but in the GridView class the processEvent function is declared as Ext.emptyFn.

My questions are:
1) What for is this empty function?
2) Should I use another way to close the window? Can I just override processEvent method in the GridPanel so that it does not call this.view.processEvent?

28 Dec 2009, 6:23 AM
You can't destroy the grid in a rowdblclick event handler.

You should delay the event with:

rowdblclick: {
fn: function () {
/* code */
delay: 10

28 Dec 2009, 7:42 AM
It works, thank you.