我使用此代码在网格的每一行显示自定义工具提示。问题是我只能在一些列上显示它。我如何检索beforeshow事件中的cellIndex? 我试着tipp.triggerElement.cellIndex和tipp.anchorElement.cellIndex,但我得到了一个未定义extjs工具提示获取单元格索引
var tip = Ext.create('Ext.tip.ToolTip', {
// The overall target element.
target: grid.el,
// Each grid row causes its own separate show and hide.
delegate: grid.view.cellSelector,
// Moving within the row should not hide the tip.
trackMouse: true,
// Render immediately so that tip.body can be referenced prior to the first show.
renderTo: Ext.getBody(),
listeners: {
// Change content dynamically depending on which element triggered the show.
beforeshow: function updateTipBody(tipp) {
}
}
});
我得到了一个未定义,可你在哪里找到getCurrentPosition方法请你联系我?我无法在[docs]中找到它(http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.selection.Model) – andyts93
http://docs.sencha.com/ ExtJS的/ 4.2.2 /#!/ API/Ext.selection.CellModel法,getCurrentPosition。如果它分机js 5或以上去与getPosition方法 –