ExtJS -- QuickTip grid设置鼠标移动到行时提示第一列的信息
2016-05-04 10:38
429 查看
//设置鼠标移动到行时提示第一列的信息
erweiGrid.on('mouseover', function(e) {// 添加mouseover事件
var index = erweiGrid.getView().findRowIndex(e.getTarget());// 根据mouse所在的target可以取到列的位置
if (index !== false) {// 当取到了正确的列时,(因为如果传入的target列没有取到的时候会返回false)
var record = erweiStore.getAt(index);// 把这列的record取出来
var tipText = record.get('c0').toString().trim();
var rowEl = Ext.get(e.getTarget());// 把target转换成Ext.Element对象
rowEl.set({
'ext:qtip' : tipText
// 设置它的tip属性
}, false);
}
});
erweiGrid.on('mouseover', function(e) {// 添加mouseover事件
var index = erweiGrid.getView().findRowIndex(e.getTarget());// 根据mouse所在的target可以取到列的位置
if (index !== false) {// 当取到了正确的列时,(因为如果传入的target列没有取到的时候会返回false)
var record = erweiStore.getAt(index);// 把这列的record取出来
var tipText = record.get('c0').toString().trim();
var rowEl = Ext.get(e.getTarget());// 把target转换成Ext.Element对象
rowEl.set({
'ext:qtip' : tipText
// 设置它的tip属性
}, false);
}
});
相关文章推荐
- CRM开发要点(一)
- PHP json_encode 中, json的values中开头有换行的问题
- Uiview的拖拽
- StringBuilder和StringBuffer的区别
- SoapUI 设置 request data with json body
- UIImage两种初始化的区别
- LeMaker Guitar:扩展系统分区
- 400 (bad request) post
- UIView中坐标的转换
- 【Leetcode】Top K Frequent Elements
- ios 使用UINavagationController时,push,pop方法执行的一些方法 - shidaying
- hibernate query.list() 返回的数据类型
- IntelliJ IDEA 安装插件 (vue)
- UICollectionViewFlowLayout使用示例
- 安装ZeroMQ时候,会出现configure: error: Package requirements (libsodium) were not met,解决办法如下
- UIBezierPath精讲
- iOS UICollectionView基本属性 和 代理方法
- 如何获得select被选中option的value和text
- require()函数
- UIImage的两种初始化方式