Blog Archive

ExtJs loop through Store Records

The each() function comes handy when you have loop thru a data store. The each method can iterate an array or any iterable object and invoke the given callback function for each item. Basically it will call the function with each record in the store. Here is an example...

var store = grid.getStore();
store.each(function(record,idx){
 //do whatever you want with the record 
 console.log(record.get('fieldName'); 
});