1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| var store = new Ext.data.JsonStore({
url: url,
fields: mesChampsDeDonnees,
autoLoad: true
});
var gp = new Ext.grid.GridPanel({
renderTo: Ext.getBody(),
store: store,
loadMask: new Ext.LoadMask(Ext.getBody(), {msg:"Loading..."}),
width: 900,
height: 450,
tbar: [new Ext.Toolbar.Button({
text: 'Infos',
icon: 'img/information.png',
handler: function(){}
}),
'-',
new Ext.Toolbar.Button({
text: 'Cartographie',
icon: 'img/map.png',
handler: function(){}
}),
'->',
new Ext.Toolbar.Button({
text: 'Télécharger les données',
icon: 'img/compress.png',
handler: function(){}
})
],
columns: mesColonnes,
sm: new Ext.grid.RowSelectionModel({
singleSelect: true,
listeners : {
rowselect: function(grid, idx, evt) {
console.debug(grid.store.getAt(idx).get('espece'));
}
}
})
}); |
Partager