Page 86 of 97 FirstFirst ... 3676848586878896 ... LastLast
Results 851 to 860 of 965

Thread: [1.0] Grid RowActions Plugin

  1. #851
    Ext JS Premium Member
    Join Date
    Feb 2009
    Posts
    487
    Vote Rating
    6
      0  

    Default

    Yea, sorry - should have clarified in my post more clearly. I do indeed have one instance of the plugin in a column with multiple icons in it already. What I can't figure out is how to hide or show icons depending on the value in another cell in the row. Would I have to use hideIndex or is there a better way? What I'm trying to achieve is a kind of toggle to change the status of the row from one value to another by clicking the row action (and, obviously, updating the store to reflect the change).

  2. #852
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Vote Rating
    403
      0  

    Default

    Yes, hideIndex. Then you can dynamically set that field in the store to show/hide icons.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


  3. #853
    Ext JS Premium Member
    Join Date
    Feb 2009
    Posts
    487
    Vote Rating
    6
      0  

    Default

    Nice one. Will actually be a bit more involved that than as there's 3 different statuses that can be set so I guess with a little logic, 3 fields and 3 actions I can get what I need.

  4. #854
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Vote Rating
    403
      0  

    Default

    Yes, that can be done but if you have 3 of them then not with hideIndex.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


  5. #855
    Ext JS Premium Member
    Join Date
    Feb 2009
    Posts
    487
    Vote Rating
    6
      0  

    Default

    Then how? If I have 3 fields in the grid with the right logic applied to their mapping function so that only one on each row can be a zero then it should be no problem....shouldn't it?

  6. #856
    Ext JS Premium Member
    Join Date
    Aug 2007
    Location
    Germany
    Posts
    139
    Vote Rating
    1
      0  

    Cool Grouping grids support

    Hi Saki!

    A few days ago I reported a bug on grouping support in 3.3RC. By now it 3.3 has been realeased, so i tried to find out what causes the problem and i found out that GroupingView had been rewritten, so that
    PHP Code:
    view.interceptMouse 
    does not exist anymore.

    The correction seems easy. I only changed one line in your code. The overhead results from Version-compatibility.

    PHP Code:
            // actions in grouping grids support
            
    if(view.groupTextTpl && this.groupActions) {
                        if (
    Ext.version.replace(/\./gi"") >=330) {
                                
    view.processEvent view.processEvent.createInterceptor(function(name,e) {
                                        if(
    e.getTarget('.ux-grow-action-item')) {
                                                return 
    false;
                                        }
                                });
                            } else {
                                
    view.interceptMouse view.interceptMouse.createInterceptor(function(e) {
                                        if(
    e.getTarget('.ux-grow-action-item')) {
                                                return 
    false;
                                        }
                                });
                            }
                
    view.groupTextTpl 
                     
    '<div class="ux-grow-action-text">' view.groupTextTpl +'</div>' 
                    
    +this.processActions(this.groupActionsthis.tplGroup).apply()
                ;
            } 
    Seems to work but i havent digged in the code very deep so its a guess and my be there are sideeffects.
    Is there a more elegant way to be compatible with all Ext3 Versions ?

    Thats all, may be someone has the same probelm

    Greetz
    Spirit

  7. #857
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Vote Rating
    403
      0  

    Default

    Thank you very much. The above is fine for backward compatibility - I would probably do it the same way.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


  8. #858
    Sencha User
    Join Date
    Oct 2010
    Posts
    2
    Vote Rating
    0
      0  

    Default

    Hi Jozef,

    I'm having trouble with hiding groupactions. I tried using hideIndex, but the icon is always shows. I also tried using hide: true, but even then all icons are shown. I'm using ExtJs 3.2.1.



    Code:
    this.action = new Ext.ux.grid.RowActions({
                    header: '',
                    keepSelection: true,
                    actions: [
                        {
                            iconCls: 'icon-edit-doc',
                            tooltip: 'Document aanpassen',
                            hideIndex: 'notEditable'
                        }, {
                            iconCls: 'icon-delete-doc',
                            tooltip: 'Document verwijderen',
                            hideIndex: 'notEditable'
                        }
                    ],
                    groupActions: [
                        {
                            iconCls: 'icon-add-doc',
                            qtip: 'Document toevoegen',
                            hide: true,
                            callback: function(grid, records, action, groupId) {
                                alert('Callback: icon-add-table', 'Group: <b>{0}</b>, action: <b>{1}</b>, records: <b>{2}</b>', groupId, action, records.length);
                            }
                        }
                    ]
                });
    
    
    store: new Ext.data.GroupingStore({
    reader: reader,
                        data: dummyData,
                        groupField: 'documentGroup',
                    })
    
    
    
    var reader = new Ext.data.ArrayReader({}, [
            {name: 'documentName'},
            {name: 'added', type: 'date', dateFormat: 'd/m/Y'},
            {name: 'documentGroup'},
            {name: 'notEditable', type: 'boolean'}
        ]);

  9. #859
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Vote Rating
    403
      0  

    Default

    Group actions are "static" - they are not dynamically hideable. Thus, hide config option is ignored.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


  10. #860
    Ext JS Premium Member
    Join Date
    Aug 2007
    Location
    Germany
    Posts
    139
    Vote Rating
    1
      0  

    Default RowActions in GridPanel, only EXT3.3

    Hi Saki!

    This time i have a problem with closing a GridPanel which uses Rowactions.
    The failure is limited to new Version Ext 3.3. In 3.21. i can close it without fault.

    PHP Code:
    this.config[i].destroy is not a function
    [Break 
    on this errorthis.config[i].destroy(); 
    ext-all-debug.js (Zeile 49093)

    I m not getting the point here, so may be you can help ?

    Greetz Spirit

Page 86 of 97 FirstFirst ... 3676848586878896 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •