2016-04-21 46 views

回答

2

如果你想更改列的標籤,你需要使用一個名爲menuText配置actioncolumn

例子:(https://fiddle.sencha.com/#fiddle/1944

 { 
      xtype:'actioncolumn', 
      width:50, 
      menuText: 'My Actions', 
      items: [{ 
       icon: 'extjs-build/examples/shared/icons/fam/cog_edit.png', // Use a URL in the icon config 
       tooltip: 'Edit', 
       handler: function(grid, rowIndex, colIndex) { 
        var rec = grid.getStore().getAt(rowIndex); 
        alert("Edit " + rec.get('firstname')); 
       } 
      },{ 
       icon: 'extjs-build/examples/restful/images/delete.png', 
       tooltip: 'Delete', 
       handler: function(grid, rowIndex, colIndex) { 
        var rec = grid.getStore().getAt(rowIndex); 
        alert("Terminate " + rec.get('firstname')); 
       } 
      }] 
     }