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');
});
No comments:
Post a Comment
NO JUNK, Please try to keep this clean and related to the topic at hand.
Comments are for users to ask questions, collaborate or improve on existing.