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 46 47 48 49
| function fmtAct(value,rowIndex){
return objCtrl.formatActions(value,rowIndex);
}
function fmtEdLnk(value,rowIndex){
return objCtrl.formatEditLink(value,rowIndex);
}
function fmtDescr(value,rowIndex){
return objCtrl.formatDescription(value,rowIndex);
}
var layout = [
{ type : "dojox.grid._CheckBoxSelector" },
{
cells : [
{ field: "actions", name: labels.actions,
formatter : fmtAct,
width: "65px", noresize: true
},
{ field: "name", name: labels.name,
formatter : fmtEdLnk,
width: "auto", noresize: true, editable: true, style: "overflow:hidden;white-space:nowrap;"
},
{ field: "desc", name: labels.description,
formatter : fmtDescr,
width: "200px", editable: true }
]
}
];
grid = new dojox.grid.DataGrid({
query: { pos_num: '*' },
store: objCtrl.itemFWStore,
structure: layout,
canSort: noSort,
autoHeight: true,
width: "720px",
rowsPerPage: 200
}, objCtrl.gridNodeID);
if ( grid != null ) {
objCtrl.grid = grid;
grid.startup();
grid.store.close();
grid.setSortIndex(0, true);
grid.sort();
grid.update();
grid.resize();
} |
Partager