PDA

View Full Version : GridView 'findHeaderIndex' IE7 bug


fabrizim
04-19-2007, 09:22 AM
I added a toolbar to the header panel of a gridview, and after a button is clicked, I was receiving Ext.fly(...) is not an object errors within IE. I tracked it down and found where the problem was.

The GridView class should be changed from (GridView.js Line 401 in 1.0 release):

findHeaderIndex : function(n){
var r = Ext.fly(n).findParent("td." + this.hdClass, 6);
return r ? this.getCellIndex(r) : false;
},

findHeaderCell : function(n){
var r = Ext.fly(n).findParent("td." + this.hdClass, 6);
return r ? r : false;
},


to:

findHeaderIndex : function(n){
if(!n){
return false;
}
var r = Ext.fly(n).findParent("td." + this.hdClass, 6);
return r ? this.getCellIndex(r) : false;
},

findHeaderCell : function(n){
if(!n){
return false;
}
var r = Ext.fly(n).findParent("td." + this.hdClass, 6);
return r ? r : false;
},


It looks like this check is already in place for findRowIndex, and possibly others. I think the problem is from an event returning a bad target in IE.

Regards-
Mark

amackay11
06-13-2007, 09:58 AM
Bump... this still seems to be a problem in 1.1 B1, using ext-base.js

http://extjs.com/forum/showthread.php?p=38777

evant
10-31-2007, 06:36 PM
Hey guys,

Bumping this one up, I'm having a similar issue and the proposed code above seems to work. Can you have a(nother?) look into this?