PDA

View Full Version : Bind event on refresh editor grid



dblosevn
5 May 2010, 9:23 AM
I cant seem to find an event on the store or grid that is fired everytime the grid is updated, new records are added, or the grid is paged. I need to run some javascript when any of these actions happen to rebind to some buttons in the rows of the grid. I thought store.onload was it but it seems to only fire once when the store is initially loaded. Any help would be greatly appreciated.

dblosevn
5 May 2010, 1:14 PM
Well after i figured out how to make firebug log all events fired by an object I was unable to find an all encompassing event to listen to that handled all the actions I needed but was able to resolve it with this.


store.on({
'load':{
fn: function(store, records, options){
update_manage();
},
scope:this
},
'save':{
fn: function(store, records, options){
update_manage();
},
scope:this
},
'add':{
fn: function(store, records, options){
update_manage();
},
scope:this
},
'update':{
fn: function(store, records, options){
update_manage();
},
scope:this
}
});