Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我希望在单击网格中的单元格时调用 javascript 函数。我想要使用 extjs 3.4 的相同代码。我怎样才能实现它?任何人都可以帮助我吗?
将选择模型设置为CellSelectionModel并在单元格选择上调用您的函数:
CellSelectionModel
var grid = new Ext.grid.GridPanel({ // .. sm: new Ext.grid.CellSelectionModel({ listeners: { cellselect: function(sm, row, col) { Ext.Msg.alert('click','got a click!'); } } }) })