source: [view]
var _this = this,
cnt = this._cacheSize,
args = {
"start": start,
"onBegin": function(size){
_this._storeSize = size;
},
"onComplete": function(items){
if(!dojo.some(items, function(item, i){
if(_this._checkRow(item, searchArgs, isGlobal)){
onSearched(start + i, item);
return true;
}
return false;
})){
if(cnt > 0 && start + cnt < _this._storeSize){
_this._search(searchArgs, start + cnt, onSearched, isGlobal);
}else{
onSearched(-1, null);
}
}
}
};
if(cnt > 0){
args.count = cnt;
}
this.grid._storeLayerFetch(args);