fabrizim
19 Apr 2007, 5: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
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