PDA

View Full Version : Grid destroy problem in IE6



spawn150
13 Jul 2007, 12:45 AM
Hi all,

I've some problems with the grid when I call the destroy() method, just in IE6. When I call the method, the grid is removed, but if I use a Ext.Resizable component, it remains there in the mask, how can I remove it? Other problem: if I close the brower after the call of the destroy() method, I receive the error that you can see into the error.jpg image attached.

this is the code that fails into prototype.js:



stopObserving: function(element, name, observer, useCapture) {
element = $(element);
useCapture = useCapture || false;

if (name == 'keypress' &&
(navigator.appVersion.match(/Konqueror|Safari|KHTML/)
|| element.detachEvent))
name = 'keydown';

if (element.removeEventListener) {
element.removeEventListener(name, observer, useCapture);
} else if (element.detachEvent) {
try {
element.detachEvent('on' + name, observer);
} catch (e) {}
}
}


This is my simple javascript file where I create and destroy the grid:

[CODE]
var grid;
var ds;
var colModel;

function createGrid(){

var myData = [
[null, null, '250', 'CLIENTE HUM','R INACIO P DA SILVA, 188 JUBURUNA 29123170 - VILA VELHA - ES', '(11) 1111-1111','VENCIMENTO DIA 10','', false],
[null, null, '150', 'CLIENTE DOIS','R INACIO P DA SILVA, 188 JUBURUNA 29123170 - VILA VELHA - ES', '(22) 2222-2222','VENCIMENTO DIA 10','', false],
[null, null, '350', 'CLIENTE TR

spawn150
13 Jul 2007, 5:17 AM
I've tested this page also with IE7 and I've received same error. Nothing change also with last Ext 1.1 release.

tryanDLS
13 Jul 2007, 8:05 AM
The grid doesn't know about the Resizable that you added, so i can't destroy it. You have to destroy that yourself.

The error on browser close may be an issue with prototype's handing of window unload. Are you actually doing any handling of the unload event?
Can you test your code with the ext-base adapter?

spawn150
14 Jul 2007, 2:39 AM
Hi tryanDLS, with ext-base, the same code, it works! The problem is that I'm using Ext 1.0.1! how can I solve this in the actual stable Ext version? :-?

Regarding the Resizable problem, if I call the destroy method on the Resizable object, it disappears correctly. But the problem is when I create a new table. Infact in this case It creates a <div> element with id "gridParticipant-rzwrap", that wraps my div#gridParticipant. If I destroy the grid, the div#gridParticipant-rzwrap stays there and where I will create a new Grid, it will be created a new div#gridParticipant-rzwrap that wraps also the old one. I don't know if I'm explaining clearly the situation. How is it the correct practice to create-destroy-create...a Grid?

Thanks a lot for the help,

Francesco

spawn150
16 Jul 2007, 9:27 AM
Someone has some suggestion about this problem? :((

tryanDLS
16 Jul 2007, 9:55 AM
Does it work with the prototype adapter in 1.1RC1? If so, you could probably diff the 2 files to see what changed.

spawn150
17 Jul 2007, 12:55 AM
No, it doesn't work! :( the only way that works correctly is with Ext 1.1 using Ext-base adapter...