PDA

View Full Version : Grids with IE7



Euphreme
7 Feb 2007, 1:10 PM
I'm trying to work with grids in IE7, but I get the following error:

Error:'this.config[...].hidden' is null or not an object.

I do have a hidden column, but to test, I tried removing it and still have the problem.
The code works fine in Firefox 2.0

I can't test with IE6 anymore.

Any clue on this ?

Thanks,
Pascal

tryanDLS
7 Feb 2007, 3:16 PM
If it works in FF, but not IE, the first thing to check for, is an extra comma in an object declaration.

Euphreme
7 Feb 2007, 6:57 PM
Thanks, that was it.

Euphreme
7 Feb 2007, 7:13 PM
I guest I replied to quickly, I realy had commas at the end of the declarations, but now, don't have any anymore, here is the declaration:


var attributeValueData = [

["16", "1"],

["17", "2"],

["18", "3"],

["19", "4"],

["20", "5"],

["22", "61"],

["", ""]
];
var grid = null;

var AttributeValueGrid = {
init : function()
{
var dataModel = new YAHOO.ext.grid.DefaultDataModel(attributeValueData);
var sort = YAHOO.ext.grid.DefaultColumnModel.sortTypes;

var colModel = new YAHOO.ext.grid.DefaultColumnModel([
{header: "ID", hidden: true},
{header: "Valeurs", sortable: true, sortType: sort.asUCString, hidden: false}
]);

grid = new YAHOO.ext.grid.Grid('attributeValuesGridDiv', dataModel, colModel);
grid.render();

grid.getSelectionModel().selectFirstRow();
}
}

kjordan
7 Feb 2007, 7:48 PM
I guest I replied to quickly, I realy had commas at the end of the declarations, but now, don't have any anymore, here is the declaration:


var attributeValueData = [

["16", "1"],

["17", "2"],

["18", "3"],

["19", "4"],

["20", "5"],

["22", "61"],

["", ""]
];
var grid = null;

var AttributeValueGrid = {
init : function()
{
var dataModel = new YAHOO.ext.grid.DefaultDataModel(attributeValueData);
var sort = YAHOO.ext.grid.DefaultColumnModel.sortTypes;

var colModel = new YAHOO.ext.grid.DefaultColumnModel([
{header: "ID", hidden: true},
{header: "Valeurs", sortable: true, sortType: sort.asUCString, hidden: false}
]);

grid = new YAHOO.ext.grid.Grid('attributeValuesGridDiv', dataModel, colModel);
grid.render();

grid.getSelectionModel().selectFirstRow();
}
}

Do you still get the same error?

Euphreme
7 Feb 2007, 8:40 PM
Looks like the comma problem is fixed, I still have an error, but looks like is other JavaScript that is poping the alert ...

I tried to keep only the grid code and looks fine.

I've worked for to long before checking in IE, that's what happen, can't pin point the source of the problem now ...

Thanks any way.