1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    16
    Vote Rating
    0
    mk.ranjan is on a distinguished road

      0  

    Default Answered: ActionColumn on grid not working in extjs v4

    Answered: ActionColumn on grid not working in extjs v4


    Hi, Am facing issue with actioncolumn, It is not working in my case, & unable to identify the reason also.
    For safe, i am adding actioncolumn code given in sencha doc in kitchensink application, but it is not working and not displaying the icon or text or any html on grid rows.
    Below is my code:

    Code:
    Ext.define('KitchenSink.view.examples.grids.BasicGrid', {    extend: 'KitchenSink.view.examples.Example',
        requires: [
            'Ext.grid.Panel',
            'KitchenSink.store.Restaurants'
        ],
        
        items: [
            {
                xtype: 'grid',
                
                title: 'Restaurants',
                frame: true,
                
                store: 'Restaurants',
                
                columns: [
                    { text: 'Name', flex: 1, dataIndex: 'name' },
                    { text: 'Cuisine', flex: 1, dataIndex: 'cuisine' },
    		        {
    		            text: 'Action',
    		            xtype:'actioncolumn',
    		            width:50,
    		            items: [{
    		                icon: 'extjs/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/examples/restful/images/delete.png',
    		                tooltip: 'Delete',
    		                handler: function(grid, rowIndex, colIndex) {
    		                    var rec = grid.getStore().getAt(rowIndex);
    		                    alert("Terminate " + rec.get('firstname'));
    		                }
    		            }]
    		        }
                ]
            }
        ]
    });
    Please help me out as i spent multiple hours on it till now

  2. Kitchen Sink example use "ext-neptune.js" which overrides Ext.grid.column.Column and this will ignore Ext.grid.column.Action.defaultRenderer. Try to remove the following line from index.html:
    Code:
        <script type="text/javascript" src="../../ext-neptune.js"></script>

  3. #2
    Sencha - Community Support Team
    Join Date
    Jan 2012
    Posts
    1,376
    Answers
    346
    Vote Rating
    113
    vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all

      0  

    Default


    Kitchen Sink example use "ext-neptune.js" which overrides Ext.grid.column.Column and this will ignore Ext.grid.column.Action.defaultRenderer. Try to remove the following line from index.html:
    Code:
        <script type="text/javascript" src="../../ext-neptune.js"></script>

  4. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    16
    Vote Rating
    0
    mk.ranjan is on a distinguished road

      0  

    Default


    Thanks, it worked..

  5. #4
    Sencha User
    Join Date
    Oct 2012
    Posts
    16
    Answers
    1
    Vote Rating
    0
    corneadoug is on a distinguished road

      0  

    Default


    No way to make it work by keeping neptune.js?

Thread Participants: 2