Sunday, April 29, 2012

Event handling on images rendered in gridPanel

The handler function for an item can be used to write the mouseclick event logic.
 
 
columns: [ 
              {
                  xtype:'actioncolumn',
                  header: "Action",
                  width:55,
                  items: [{
                            icon:'{!$Resource.Images}/Image.png',
                            tooltip: 'Configure Kit',
                            id:'ImageId',
                            style: {
                                 marginLeft: '5px'
                            },
 
                            handler: function(grid, rowIndex, colIndex) {
                               var rec = grid.getStore().getAt(rowIndex);
                                // Do the click event logic here 
 
 
                            } 
                                    
                  }] 
         ]  

No comments:

Post a Comment