PDA

View Full Version : [Solved] Error with the id of my columns



BenWebMap
16 Aug 2010, 7:41 AM
Hi
I make an application that use Extjs, specially for the gridPanel.
It's work great with Firefox, Opera, Safari and Google Chrome but not with Internet Explorer.

The error come from line 45545 in ext-all-debug and the error is "id is null or not an object".
So I add an id to all my columns in my gridPanel. But the error is still here and i don't see where I have a mistake.

You can see here a part o my code that i use to create on gridPanel. May be you will see the error or someone as solve the same problem.


var grp_store1 = new Ext.data.JsonStore({
data: carte,
root: "groupes",
idProperty: 'id',
fields: ['id','nom','valeur']
});

grp_store1.filterBy(function(record){
return parseFloat(record.id)<=4;
});

var grp_sm1 = new Ext.grid.RowSelectionModel({
singleSelect: false,
listeners: {
rowselect: function(sm, rowIdx, record) {
if(selUni==false){
choix_com_grp(record.data.id);
}
},
rowdeselect: function(sm, rowIdx, record) {
survol_com.unselectAll();
for(nbCol=0;nbCol<57;nbCol++)
graph_out(nbCol);
}
}
});

var grpGrid1 = new Ext.grid.GridPanel({
store: grp_store1,
columns: [
{header: 'nom', id: 'nom', sortable: false, hideable: false, resizable: false, align:"left", width: 100, dataIndex: 'nom'},
{header: 'valeur', id: 'valeur', sortable: false, hideable: false, resizable: false, align:"right", width: 50, dataIndex: 'valeur'},
],
region: "west",
height: 100,
width: 150,
hideHeaders: true,
sm: grp_sm1
})

var grpsPanel = new Ext.Panel({
region: "center",
layout: "border",
//height: 100,
//width: 546,
items: [grpGrid1, grpGrid2]
});

Thanks for your help.

fay
16 Aug 2010, 7:49 AM
You've a trailing comma - a common IE problem - after: dataIndex: 'valeur'}, // <-- remove the comma

BenWebMap
16 Aug 2010, 9:40 AM
Thank you very much.
Shame on me, I know the problem in IE with coma, but I forget to check this part of my code.