View Full Version : [CLOSED][3.0rc1] Grid Filter and IE8
http://extjs.com/forum/images/icons/icon1.gif IE8 Bug With ExtJS 3.0 RC1
I was using the Grid Filter code with IE8 and got this error message:
Line: 14864
Error: Invalid argument.
which was this chunk of code:
if(this.allowDomMove !== false) {
ct.dom.insertBefore(this.el.dom, position)
}
in the file:
ext-all-debug.js
Please provide more information, what were you doing? What triggered the error?
It happend as soon as the filter menu (an edit) was supposed to show:
Line 14864:
if(this.el){
this.el = Ext.get(this.el);
if(this.allowDomMove !== false){
ct.dom.insertBefore(this.el.dom, position);
}
}
Line 29784: (Ext All Debug)
onRender : function(container, position){
Ext.menu.BaseItem.superclass.onRender.apply(this, arguments);
Line 39: (EditableMenuItem)
Ext.menu.EditableItem.superclass.onRender.call(this, container);
Line 14715: (Ext All Debug)
this.onRender(this.container, position || null);
Line 29004: (Ext All Debug)
c.render(c.positionEl = position ?
this.itemTpl.insertBefore(position, a, true) :
this.itemTpl.append(target, a, true));
Line 16807: (Ext All Debug)
if(c && (!c.rendered || !this.isValidParent(c, target))){
this.renderItem(c, i, target);
}
Line 29042: (Ext All Debug)
onLayout : function(ct, target){
this.renderAll(ct, target);
this.doAutoSize();
},
Line 16787: (Ext All Debug)
layout : function(){
var target = this.container.getLayoutTarget();
this.onLayout(this.container, target);
this.container.fireEvent('afterlayout', this.container, this);
},
Line 16653: (Ext All Debug)
doLayout : function(shallow){
var rendered = this.rendered;
if(rendered && this.layout){
this.layout.layout();
}
Line 16512: (Ext All Debug)
if(!this.ownerCt){
this.doLayout();
}
Line 29297: (Ext All Debug)
show : function(el, pos, parentMenu){
this.parentMenu = parentMenu;
if(!this.el){
this.render();
}
Line 30034: (Ext All Debug)
deferExpand : function(autoActivate){
delete this.showTimer;
this.menu.show(this.container, this.parentMenu.subMenuAlign || 'tl-tr?', this.parentMenu);
if(autoActivate){
this.menu.tryActivate(0, 1);
}
},
Please provide more information, what were you doing? What triggered the error?
this was my initial script (I copied the 2.2 scripts, maybe that was my mistake?):
Ext.onReady
(
function()
{
var record = Ext.data.Record.create
(
[
{ name: "ID" },
{ name: "FirstName" },
{ name: "LastName" },
{ name: "PhoneNumber" },
{ name: "NickName" }
]
);
var ds = new Ext.data.Store
(
{
storeId: "TopicGridStore",url: "/Default.ashx?state=data",
reader : new Ext.data.XmlReader
(
{
totalRecords: "@totalRecords",record: "Entry",id: "ID"
},
record
),
remoteSort: false,
}
);
Ext.grid.filter.StringFilter.prototype.icon = 'img/find.png';
//debugger;
var filters = new Ext.grid.GridFilters
(
{
filters: [
{type: "string",dataIndex: "FirstName"
},
{type: "string",dataIndex: "LastName"
}
]});
var paging = new Ext.PagingToolbar
(
{
pageSize: 10,
store: ds,
plugins: filters,
displayInfo: true,
displayMsg: 'Displaying Items {0} - {1} of {2}',
emptyMsg: "No Items To Display"
}
);
var grid = new Ext.grid.GridPanel
(
{
id: "TopicGrid",store: ds,columns: [
{
header: "FirstName",width: 120,dataIndex: "FirstName",renderer: Ext.util.Format.capitalize,sortable: false
},
{
header: "LastName",width: 180,dataIndex: "LastName",renderer: Ext.util.Format.capitalize,sortable: false
},
{
header: "PhoneNumber",width: 115,dataIndex: "PhoneNumber",renderer: formatter_phonenumber,sortable: false
},
{
header: "NickName",width: 100,dataIndex: "NickName",renderer: Ext.util.Format.capitalize,sortable: false
}],
bbar: paging,plugins: filters,renderTo: "topic-grid",width: 535,height: 500
}
);
ds.load({params:{start:0, limit:10}});
}
);
Please provide more information, what were you doing? What triggered the error?
in the IE debugger, if I set "position" to null instead of "undefined," I don't get the exception.
i.e. if I put in a breakpoint on 14864 and change "undefined" to null then I don't get the excepetion. the breakpoint is hit several times and it's only the last time that "position" is undefined.
Please provide more information, what were you doing? What triggered the error?
I changed line 39 in EditableItem.js to this (I added null argument):
Ext.menu.EditableItem.superclass.onRender.call(this, container, null);
and the script error vanished.
Hence, it seems like "Ext All 3.0" needs to handle the case where the position isn't specified so it's undefined.
dawesi
5 May 2009, 12:41 AM
or just don't put that parameter in there in the first place?
aconran
5 May 2009, 11:54 AM
Closing this one out. Grid filtering has yet to be ported to Ext 3.0 and is not found in the SDK yet.
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.