日期:2014-05-16 浏览次数:20505 次
书上看的
?
只要在你页面最先加载的地方,或者是extjs-all.js的最下面加上? 下面的代码即可。
?
Ext.data.Store.prototype.applySort=function(){
if(this.sortInfo && !this.remoteSort){
var s = this.sortInfo,f = s.field;
var st = this.fields.get(f).sortType;
var fn = function(r1,r2){
var v1 =st(r1.data[f]),v2 = st(r2.data[f]);
if(typeof(v1) =="string"){
return v1.localeCompare(v2);
}
return v1>v2?1:(v1<v2?-1:0);
};
this.data.sort(s.direction,fn);
if(this.snapshot && this.snapshot != this.data){
this.snapshot.sort(s.direction,fn);
}
}
};
?
书也是别人下载下来免费送的。下面我把他放到附件里,有需要的同学,可以下下来,看看。