1. #11
    Sencha User
    Join Date
    Feb 2008
    Posts
    36
    Vote Rating
    0
    cjauvin is on a distinguished road

      0  

    Default


    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":

    PHP Code:
    {
        
    xtype'rowactions',
        
    // ...
        
    groupActions: {
            
    // ...
            
    callbackExt.emptyFn
        
    }

    Second, in the "init" function of the controller, I do:

    PHP Code:
    this.control({
        
    '<some_identifier> rowactions':
            
    groupaction:  function(gridrecordsactiongroupValue) {
                
    // your handler code here..
            
    }
    }); 
    and it works! I hope it might be useful to someone.
    Last edited by cjauvin; 29 Oct 2012 at 12:54 PM. Reason: added user name

  2. #12
    Sencha User
    Join Date
    Feb 2008
    Posts
    36
    Vote Rating
    0
    cjauvin is on a distinguished road

      0  

    Default


    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.

  3. #13
    Ext Premium Member
    Join Date
    Aug 2008
    Location
    San Rafael, CA
    Posts
    31
    Vote Rating
    0
    JGALFO is on a distinguished road

      0  

    Default


    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.

  4. #14
    Sencha User
    Join Date
    Feb 2008
    Posts
    21
    Vote Rating
    0
    omegafox is on a distinguished road

      0  

    Default


    I know this thead has been quiet for two years... I am rewriting everything from ext 3.4 to 4.2.1 by converting to MVC from class system. So far, everything is working fine except groupActions. With rowactions, I can see its icon and its text on each row and can click on it with no issues. But with groupActions, I dont see any icons or text on its grouping's header at all. I did following @cjauvin and @dcona604's suggestions and it still is missing.. groupAction is one of most important part in my project. Any ideas or did I missing anything??

    PHP Code:
    Ext.define('ClassInfo.view.MainPanel',{
        
    extend'Ext.grid.Panel',
        
    alias 'widget.MainPanel',
        
    frame:true,
        
    width400,
        
    height950,
        
    autoScroll:true,
        
    requires: [ 'Ext.ux.grid.RowActions'],
    features: [{
                
    ftype'grouping',
                
    groupHeaderTpl'Course: {name} ({rows.length} Student{[values.rows.length > 1 ? "s" : ""]})'
                
    startCollapsedtrue
         
    }],
       
    initComponent: function() {
            
            
    this.store 'sClassInfo';
            
            
    this.columns = [{
                
    text     'Last Name',
                
    width    120,
                
    sortable true,
                
    dataIndex'lastname'
            
    },{
                
    text     'First Name',
                
    width    120,
                
    sortable true,
                
    dataIndex'firstname'
            
    },{
                
    text     'Print',
                
    width    150,
                
    iconCls :'icon-printer',
                
    renderer : function(value){
                    return 
    '<b>&nbsp;Welcome Sheet</b>';
                }
            },{
                
    xtype'rowactions',
                
    header:'Actions',
                
    width    150,
                
    actions: [{ 
                    
    iconCls'icon-printer'
                    
    qtip'Action on Row'
                    
    text:'Single Print',
                    
    callback: function(gridrecordactionidxcoletarget) { 
                        
    Ext.Msg.alert('Row Action'record.get('name')); 
                    } 
                }],
                
    keepSelectionfalse,
                
    groupActions: [{ 
                    
    iconCls'icon-printer'
                    
    qtip'Action on Group'
                    
    text:'Group Print',
                    
    callbackExt.emptyFn
                
    }]
    }]} 
    PHP Code:
    this.control({
            
    'MainPanel rowactions':  {
                
    groupaction :function(gridrecordsactiongroupValue) {
                
    console.log('testing group ');
            },
    action :function(gridrecordsactiongroupValue) {
                
    console.log('testing');
            }} 

  5. #15
    Ext JS Premium Member
    Join Date
    Feb 2009
    Posts
    422
    Vote Rating
    1
    Jangla is on a distinguished road

      0  

    Default


    Quote Originally Posted by JGALFO View Post
    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.
    Same problem here. The minute you reconifgure the columns, rowactions are blank.

    Edit: solution: provided you supply the store (even if you're just re-affirming the existing store), your row actions should re-render ok.

    Code:
    myGrid.reconfigure( myGrid.store, newColumnConfig );

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar