将下面代码copy到相关试图jsp页面中。
store.on('load', function(t,records,o){
store.on('load', function(t,records,o){
var so = store.lastOptions;
var sop = so? so.params : null;
var sonumber = ((sop && sop.start && sop.limit)? sop.start : 0)+ records.length;
if(sonumber > 99 && sonumber < 1000){
grid.getColumnModel().setColumnWidth(0, 28);
}
else if(sonumber > 999 && sonumber < 10000){
grid.getColumnModel().setColumnWidth(0, 35);
}
else if(sonumber > 9999){
grid.getColumnModel().setColumnWidth(0, 42);
}
else{
grid.getColumnModel().setColumnWidth(0, 20);
}
});