0

I want a javascript function to be called as I click on a cell in grid .I want code for the same using extjs 3.4. How can I achieve it? can anyone help me out in it?

Darin Kolev
  • 3,401
  • 13
  • 31
  • 46
Ankitha Nayak
  • 11
  • 2
  • 5
  • Have you checked out cell click event listener? Info in [sencha docs](http://docs.sencha.com/extjs/3.4.0/#!/api/Ext.grid.GridPanel-event-cellclick) – weeksdev Mar 26 '14 at 13:06

1 Answers1

0

Set the selection model to CellSelectionModel and call your function on cell select:

var grid = new Ext.grid.GridPanel({
    // ..
    sm: new Ext.grid.CellSelectionModel({  
        listeners: {
            cellselect: function(sm, row, col) {
                Ext.Msg.alert('click','got a click!');
            }
        }
    })
})
Darin Kolev
  • 3,401
  • 13
  • 31
  • 46