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 44 45
| var grid = null;
dojo.addOnLoad(function() {
document.getElementById('dtCP').value = '<?=date ( "d/m/Y", strtotime ( $_SESSION ['dateducomite'] ) );?>';
// our test data store for this example:
store = new dojo.data.ItemFileWriteStore(
{ url: 'visualiser/visualiser' , method:'POST' });
// set the layout structure:
var layout = [
{ name: "SI", field: "si", width: "70px" },
{ name: "N°OP", field: "n_op", width: "70px" },
{ name: "Libellé Opération", field: "lib_op", width: "150px"},
{ name: "Motif prog", field: "motif_prog", width: "70px"},
{ name: "Bénéficiaire", field: "benef", width: "120px" },
];
// create a new grid:
grid = new dojox.grid.EnhancedGrid({
query: {
n_op: '*'
},
store: store,
rowSelector: '15px',
structure: layout,
rowsPerPage: 20,
clientSort: true,
plugins: {
indirectSelection: {
name: "Séléction",
width: "70px",
styles: "text-align: center;"
}
,selectable: true
}
, selectionMode:'extended'
},
document.createElement('div'));
// append the new grid to the div "gridContainer4":
dojo.byId("gridDiv").appendChild(grid.domNode);
// Call startup, in order to render the grid:
grid.startup();
}); |
Partager