-
29 Oct 2012 12:53 PM #11
Thank you cking for this fantastic work! I'm using it with 4.1.1a and it seems to be working great so far.
I had to fiddle around for a while to understand how to make it work in the controller of a MVC app however, so I thought I might share what I came up with. In particular, I wanted the handler to a "group icon click" (i.e. the "groupaction" event) to be in the controller, and not the view.
First, it seems that in the view, the "callback" argument of the "groupActions" items MUST be defined to something: I set it to "Ext.emptyFn":
Second, in the "init" function of the controller, I do:PHP Code:{
xtype: 'rowactions',
// ...
groupActions: {
// ...
callback: Ext.emptyFn
}
}
and it works! I hope it might be useful to someone.PHP Code:this.control({
'<some_identifier> rowactions':
groupaction: function(grid, records, action, groupValue) {
// your handler code here..
}
});
Last edited by cjauvin; 29 Oct 2012 at 12:54 PM. Reason: added user name
-
7 Nov 2012 8:09 AM #12
Thanks dcoran604 for this fix! I just lost an hour trying to debug that RowActions plugin bug with 4.1.1a.
@cking If your plugin was in a Github repo, it would be easier to track version-related and other issues like this.
-
14 Nov 2012 12:55 PM #13
Great work on this plugin, however, I am having trouble when using grid.reconfigure() The icon actions disappear when you apply the reconfigure
my code goes like this:
this.columns = [{xtype: 'rowactions'... etc.},{othercols...}];
// later a button will fire the reconfigure
var newCols = [... my new reconfig...];
var newFields = [...my new fields ...];
newCols = Ext.Array.merge(this.columns,newCols);
grid.store.model.setFields(newFields);
grid.reconfigure(null,newCols);
Any ideas of what might be wrong?
FYI: I am also using grouped columns and grid locking.


Reply With Quote