RT,哪一个知道,找了好久了没搞定!
鼠标放到某一行只能提示固定列,方法如下:
[code="java"]
listeners: {
render: function(g) {
//g.on("itemmouseenter", function(grid, row, col) {
g.on("itemmouseenter", function(view,record,mode,index,e) {
grid.tip = Ext.create('Ext.tip.ToolTip', {
target: view.el, // The overall target element.
delegate: view.itemSelector, // Each grid row causes its own seperate show and hide.
trackMouse: true, // Moving within the row should not hide the tip.
renderTo: Ext.getBody(), // Render immediately so that tip.body can be referenced prior to the first show.
listeners: { // Change content dynamically depending on which element triggered the show.
beforeshow: function updateTipBody(tip) {
tip.update(view.getRecord(tip.triggerElement).get('name'));
}
}
});
});
}
}
[/code]
怎么动态获取鼠标所在列的dataIndex???