1. #431
    Sencha User
    Join Date
    Apr 2008
    Posts
    141
    Vote Rating
    0
    armandoxxx is on a distinguished road

      0  

    Default


    well ... not really ..

    I dont want to create a new RowActions object since if I do that I have to create a new grid .. my idea was just to hide one that allready existed .. like
    PHP Code:

    myRowActions
    .getAction("myAction").setHidden(true); 
    But i allready fixed it with creating two grids .. one showing all actions, one showing some actions ...

    thanx ...
    kind regards

    Armando

  2. #432
    Ext User Kudzu's Avatar
    Join Date
    Dec 2008
    Location
    KLD
    Posts
    37
    Vote Rating
    0
    Kudzu is on a distinguished road

      0  

    Default


    Hello, i try your contoll but i don't see icon in the row:
    Code:
    DeviceGrid = function(viewer, config) {
    ...
     this.actions = new Ext.ux.grid.RowAction({
            header:'Actions',
            autoWidth:false,
            width: 60,
            actions:[{
                    iconCls:'icon-delete',
                    qtip:'Delete item'
            }],
            callbacks:{
                'icon-delete':function(grid, record, action, row, col) {
                    Ext.ux.Toast.msg('tttt', 'ID: <b>{0}</b>, action: <b>{1}</b>', record.id, action);
                }
            }
        });
    ...
    this.columns = [{
            id: 'name',
            header: "Name",
            dataIndex: 'name',
            sortable:true,
            width: 220
          },{
            header: "Description",
            dataIndex: 'description',
            width: 200
          },{
              header: "Location",
              dataIndex: 'location',
              width: 60
          },
          this.actions];
    DeviceGrid.superclass.constructor.call(this, {
            region: 'center',
            id: 'dev-grid',
            loadMask: {msg:'Loading...'},
            plugins: [this.actions],
    
            sm: new Ext.grid.RowSelectionModel({
                singleSelect:true
            }),
    
            viewConfig: {
                forceFit:true,
                enableRowBody:true,
                showPreview:true
            }
        });
    };
    Magnificus Picus

  3. #433
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,538
    Vote Rating
    380
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Quite strange way of extending... At least for me... Well, check if this.action really contains RowActions when you call constructor. If everything else fails then post a working showcase please.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  4. #434
    Ext User
    Join Date
    Aug 2008
    Posts
    3
    Vote Rating
    0
    ThunderZtorm is on a distinguished road

      0  

    Default


    Quote Originally Posted by achebe View Post
    @jimkan

    I think the iframe issues are due to a bug in the 2.2 version of Ext. I had the same problem under IE until I patched the EventManager as outlined here: http://extjs.com/forum/showthread.ph...287#post236287

    I think it's because the .ext-ie class isn't being applied to the iframe's body element so Saki's ie specific css never gets applied.
    This EventManager patch actually solved my problem which is if the rowactions is contained inside iframe, it won't work/show up correctly.

    I patched my ext-all.js and ext-all-debug.js and now my rowactions works fine inside iframe, also solved other minor display bug caused by iframe.

    (problem description : http://extjs.com/forum/showthread.ph...864#post266864 )

    Thanks !

  5. #435
    Ext User
    Join Date
    Feb 2008
    Posts
    2
    Vote Rating
    0
    javaeedeveloper is on a distinguished road

      0  

    Default Typo

    Typo


    Hi, there is a typo in line 226: * (defaluts to visibility).
    Thanks

  6. #436
    Sencha User
    Join Date
    Mar 2008
    Posts
    66
    Vote Rating
    0
    yhwh is on a distinguished road

      0  

    Default Maybe a bug?

    Maybe a bug?


    Hello saki,
    I have found this post about plugins cleanup and init:
    https://extjs.com/forum/showthread.php?p=229567

    I think this plugins does not cleanup properly.
    If i destroy the grid the plugin events aren't purged.
    So i have added in init:
    Code:
    init:function(grid) {
     /* CUT */
      grid.on({
          render:{scope:this, fn:function() {
              view.mainBody.on(cfg);
            }}
          ,destroy:{scope:this, fn: this.destroy}
        });
    /*CUT */
    }
     ,destroy: function(){
             this.purgeListeners();
     }
    Do you think after purging listeners the plugin is kept in memory ?
    Is there a way to destroy completely the plugin?

  7. #437
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,538
    Vote Rating
    380
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    The only event handler installed by RowActions is onClick (or another configured actionEvent) and that is installed on grid.view.mainBody. This event listener is removed during grid.view destroy process.

    Therefore, I think that nothing of RowActions is left in memory after you destroy the grid except listeners you installed on RowActions itself. Removing them is the job of the user anyway but your code makes it safe if they forget.

    I'll test it for a while and I'll let you know.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  8. #438
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,538
    Vote Rating
    380
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    I've added it to the code - first tests are OK - so download it please from http://rowactions.extjs.eu and test if they destroy properly.

    [edit] devel version, w/o -1.0 suffix
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  9. #439
    Ext User
    Join Date
    Oct 2008
    Posts
    4
    Vote Rating
    0
    resonante is on a distinguished road

      0  

    Talking Error: this.ds.fields.get(C) is undefined

    Error: this.ds.fields.get(C) is undefined


    i think im doing something wrong with the row actions.
    here is the code:

    PHP Code:
            var user_datastore = new Ext.data.Store({
                
    proxy: new Ext.data.HttpProxy({url'/admin/users?format=json'method'GET'}),
                
    reader: new Ext.data.JsonReader({root'Users'id'id'totalProperty'Total'},
                              [ {
    name'id'mapping'id'},
                                  {
    name'firstname'mapping'firstname'},
                                {
    name'lastname'mapping'lastname'},
                                {
    name'login'mapping'login'},
                                {
    name'email'mapping'email'},
                                {
    name'state'mapping'state'
                              ]),
                                  
    remoteSorttrue,
                                  
    sortInfo: {field'id'direction'ASC'}});
                                
            var 
    sm = new Ext.grid.CheckboxSelectionModel();
                                
              var 
    action = new Ext.ux.grid.RowActions({
              
    header:'Actions',
                
    actions:[{
                
    iconCls:'show',
                
    tooltip:'Show'
                
    },{
                
    iconCls:'edit',
                
    tooltip:'Edit'
                 
    },{
                
    iconCls:'remove',
                
    tooltip:'Delete'
                 
    }]
              });
                        
              var 
    user_column_model = new Ext.grid.ColumnModel([
                
    sm,
                {
    header'Firstname'dataIndex'firstname'},
                {
    header'Lastname'dataIndex'lastname'},
                {
    header'Username'dataIndex'login'},
                {
    header'Email'dataIndex'email'},
                {
    header'Status'dataIndex'state'},
                
    action
              
    ]);        
                                    
            
    Ext.onReady(function(){
                
            
    Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
            
    Ext.QuickTips.init();

                  var 
    ds user_datastore;
                  var 
    cm user_column_model;
                  
    cm.defaultSortable true;

                  
    // create the grid
                  
    var grid = new Ext.grid.GridPanel({
                      
    dsds,
                      
    cmcm,
                      
    smsm,
                      
    renderTo:   'user-grid',
                      
    width:      550,
                      
    height:     400,
                      
    stripeRowstrue,
                      
    viewConfig: {
                          
    forceFit:true
                      
    },

                      
    // inline toolbars
                      
    tbar:[''],
                      
    bbar: new Ext.PagingToolbar({
                                
    pageSize20,
                                
    storeds,
                                
    displayInfotrue,
                                
    displayMsg'Record {0} - {1} of {2}',
                                
    emptyMsg"No records found"
                      
    }),
                      
    plugins:[new Ext.ux.grid.Search({
                                  
    position:'top'
                                 
    ,minChars:2
                                 
    ,autoFocus:true                                                        
                              
    }), action]
                  });
              
    action.on({
                  
    action:function(gridrecordactionrowcol) {
                  switch(
    action){
                  case 
    'show':
                   
    window.location.href '/admin/users/' grid.getStore().getAt(row).data.id;
                   break;
                  case 
    'edit':
                   
    window.location.href '/admin/users/' grid.getStore().getAt(row).data.id '/edit';
                   break;
                  case 
    'remove':
                       if (
    confirm('delete?')) { 
                        var 
    conn = new Ext.data.Connection();
                        
    conn.request({
                          
    url'/admin/users/' grid.getStore().getAt(row).data.id,
                          
    method'POST',
                          
    params: { _method'DELETE'
                                    
    authenticity_tokenencodeURIComponent('<%= form_authenticity_token %>')
                                  },
                          
    success: function(responseoptions){ ds.load(); },
                          
    failure: function(responseoptions){ alert('Delete operation failed.'); }
                        });                                                                      
                   break;
                   }
                  }  
                  },
                  
    beforeaction:function() {
                
                  }
                  });
                  
    // show record on double-click
                  
    grid.on("rowdblclick", function(gridrowe) {
                    
    grid.suspendEvents();
                    
    window.location.href '/admin/users/' grid.getStore().getAt(row).data.id;
                  });

                  
    ds.load({params: {start:0limit:20}});
                  
              }); 
    and i get this error:

    this.ds.fields.get(C) is undefined

    thank you.

  10. #440
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,538
    Vote Rating
    380
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    I haven't seen such error before. Set Firebug to "Break an all errors" and use the standard debug procedure.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


Thread Participants: 227

  1. franklt69 (10 Posts)
  2. Condor (3 Posts)
  3. Enrico (1 Post)
  4. Dumbledore (2 Posts)
  5. mystix (1 Post)
  6. riets003 (2 Posts)
  7. KRavEN (3 Posts)
  8. sfwalter (1 Post)
  9. Taurus (3 Posts)
  10. fshort (5 Posts)
  11. tchitani (2 Posts)
  12. temporary (1 Post)
  13. pantarhei (2 Posts)
  14. Specks (5 Posts)
  15. spotk (1 Post)
  16. cmendez21 (2 Posts)
  17. anjelika (3 Posts)
  18. askar (3 Posts)
  19. 6epcepk (1 Post)
  20. lkasdorf (1 Post)
  21. Gunmen (1 Post)
  22. mjlecomte (7 Posts)
  23. Nam (2 Posts)
  24. rekam (4 Posts)
  25. ZooKeeper (3 Posts)
  26. cking (1 Post)
  27. JEBriggs (1 Post)
  28. Yossi (9 Posts)
  29. border9 (2 Posts)
  30. justinfalk (1 Post)
  31. Spirit (6 Posts)
  32. gounis (1 Post)
  33. .andy (1 Post)
  34. robin30 (2 Posts)
  35. knt (2 Posts)
  36. Shmoo (2 Posts)
  37. Strati (1 Post)
  38. jerrybrown5 (12 Posts)
  39. KevinChristensen (1 Post)
  40. jon (2 Posts)
  41. BigTitus (2 Posts)
  42. elDub (4 Posts)
  43. fgerneth (2 Posts)
  44. elnove (2 Posts)
  45. vendiddy (1 Post)
  46. ray007 (6 Posts)
  47. dizelland (1 Post)
  48. donssmith (1 Post)
  49. horrikhalid (5 Posts)
  50. wasp (1 Post)
  51. cblin (1 Post)
  52. ncx5 (3 Posts)
  53. mask_hot (1 Post)
  54. teddyjas (2 Posts)
  55. Zolcsi (1 Post)
  56. PTG (5 Posts)
  57. yaroslav (2 Posts)
  58. Yoris (3 Posts)
  59. DhakouaniM (1 Post)
  60. lobo-tuerto (12 Posts)
  61. angelflaree (3 Posts)
  62. skhan (3 Posts)
  63. ibaniski (3 Posts)
  64. achebe (1 Post)
  65. svdb (1 Post)
  66. emily (6 Posts)
  67. jezmck (3 Posts)
  68. SAnDAnGE (1 Post)
  69. eliezerreis (4 Posts)
  70. nutflakes (2 Posts)
  71. RoDush (1 Post)
  72. tonig84 (2 Posts)
  73. kpmonroe (1 Post)
  74. KJedi (1 Post)
  75. javaeedeveloper (2 Posts)
  76. razvanioan (3 Posts)
  77. jla (2 Posts)
  78. max52 (1 Post)
  79. seppy (5 Posts)
  80. adz08 (1 Post)
  81. chalu (10 Posts)
  82. sekaijin (2 Posts)
  83. jimkan (1 Post)
  84. joao_candido (3 Posts)
  85. fanta2k (1 Post)
  86. nctag (3 Posts)
  87. yhwh (2 Posts)
  88. zmijanow (3 Posts)
  89. brizardh (3 Posts)
  90. zxyth (6 Posts)
  91. johnstontrav (2 Posts)
  92. dalad (2 Posts)
  93. niaz (4 Posts)
  94. armandoxxx (8 Posts)
  95. nojutsu (3 Posts)
  96. lfelican (2 Posts)
  97. DamienValentine (2 Posts)
  98. NoahK17 (10 Posts)
  99. shay2501 (2 Posts)
  100. sdileep (1 Post)
  101. pokerking400 (19 Posts)
  102. lacco (2 Posts)
  103. medley (8 Posts)
  104. archmisha (3 Posts)
  105. rizjoj (2 Posts)
  106. thephatp (2 Posts)
  107. descheret (1 Post)
  108. macedge (6 Posts)
  109. ttbgwt (2 Posts)
  110. allistar (3 Posts)
  111. emredagli (1 Post)
  112. Nadril (2 Posts)
  113. mbajema (1 Post)
  114. wwwtd (1 Post)
  115. Besessener (6 Posts)
  116. Chrissu (3 Posts)
  117. pavanextjs (6 Posts)
  118. javauser (2 Posts)
  119. AmitOlsys (7 Posts)
  120. afei (1 Post)
  121. kurtis (6 Posts)
  122. DamianHartin (2 Posts)
  123. kimmking (1 Post)
  124. jollyca (2 Posts)
  125. Rothariger (10 Posts)
  126. ThunderZtorm (3 Posts)
  127. Stephan Schrade (1 Post)
  128. groyk (2 Posts)
  129. bwhitehall (2 Posts)
  130. neteor (2 Posts)
  131. saipkjai (1 Post)
  132. randomuser01 (1 Post)
  133. kisjonnk (1 Post)
  134. divad (2 Posts)
  135. fxmisticat (2 Posts)
  136. dasnk (1 Post)
  137. klascano (1 Post)
  138. sarav (1 Post)
  139. ringfas (1 Post)
  140. iBeb (1 Post)
  141. kjleng (1 Post)
  142. resonante (4 Posts)
  143. wki01 (1 Post)
  144. quen567 (2 Posts)
  145. nightwatch (2 Posts)
  146. SunWuKung (2 Posts)
  147. nar (1 Post)
  148. mnc (1 Post)
  149. wgpubs (3 Posts)
  150. Stju (1 Post)
  151. d4rk knight (2 Posts)
  152. igor_vlad (1 Post)
  153. lassaad (1 Post)
  154. Dumas (5 Posts)
  155. s.m.srinivas (2 Posts)
  156. whodat (7 Posts)
  157. Kudzu (1 Post)
  158. nathanblogs (1 Post)
  159. leonardodaza (2 Posts)
  160. The Edge (1 Post)
  161. tahseen.ur.rehman (1 Post)
  162. Andrelmp (2 Posts)
  163. dfa (1 Post)
  164. cybersys (5 Posts)
  165. flylaputa (3 Posts)
  166. Tawez (2 Posts)
  167. Fred Seyffert (2 Posts)
  168. Jangla (7 Posts)
  169. agent29 (1 Post)
  170. vinaykurudi (1 Post)
  171. Jim.Barrows (2 Posts)
  172. PV-Patrick (1 Post)
  173. jakeext (2 Posts)
  174. quicksilver_in (12 Posts)
  175. dewoob (2 Posts)
  176. gelgoogho (1 Post)
  177. andyatmiami (1 Post)
  178. rat (1 Post)
  179. Margusja (6 Posts)
  180. charcalcado (1 Post)
  181. realjax (2 Posts)
  182. kartikayg (4 Posts)
  183. sanantone (1 Post)
  184. iryndin (2 Posts)
  185. Joel (2 Posts)
  186. jsemmanuel (2 Posts)
  187. jeffcirceo (1 Post)
  188. boldt (1 Post)
  189. schoonmoeder (2 Posts)
  190. kr1pton (2 Posts)
  191. 29er (1 Post)
  192. return1.at (1 Post)
  193. extjsnewb (1 Post)
  194. frrogoy (1 Post)
  195. hotdesc (2 Posts)
  196. a.bongardt (1 Post)
  197. King_Aero (1 Post)
  198. daiei27 (3 Posts)
  199. jasmina (3 Posts)
  200. winsent (1 Post)
  201. hsomesun (2 Posts)
  202. max.bertolini (1 Post)
  203. Dmoney (1 Post)
  204. maxazan (1 Post)
  205. cyChop (2 Posts)
  206. pipiet06 (2 Posts)
  207. asafm (2 Posts)
  208. adetogni (4 Posts)
  209. rebeccapeltz (10 Posts)
  210. enoal (3 Posts)
  211. rrpero (3 Posts)
  212. test45 (1 Post)
  213. kevDawg (3 Posts)
  214. anacab (1 Post)
  215. travin (1 Post)
  216. bidibule (1 Post)
  217. JimR (5 Posts)
  218. apurva_mistry (1 Post)
  219. pramodkhare (3 Posts)
  220. dm7777 (1 Post)
  221. extjs-dev (2 Posts)
  222. aveltens (1 Post)
  223. carlosgoias (1 Post)
  224. oeginc (2 Posts)
  225. schusco (3 Posts)
  226. katxeus (1 Post)
  227. ashetti (2 Posts)