【发布时间】:2013-11-04 04:40:54
【问题描述】:
我正在使用 ExtJS 4.2.1 的网格面板。我有一些带有编辑器的列定义:'textfield'(可编辑的列)和一些没有编辑器的列定义(只读列)。
我想要什么?
我想在鼠标悬停事件中用背景颜色临时突出显示该特定列的可编辑列。
我请求帮助。请指导。我花了很多时间在这上面,但都是徒劳的:(
问候, 贾格普利特·辛格
任务 - 当鼠标放在下面的可编辑 1 和 2 列上时(具有编辑器配置选项),我希望目标列用一些明亮的颜色暂时突出显示几秒钟。
Ext.define('XX.view.account.Portfolios', {
extend : 'Ext.grid.Panel',
plugins : {
ptype : 'cellediting',
clicksToEdit : 1
},
columns : [{
text : 'Read Only 1',
flex : 1,
sortable : true,
dataIndex : 'ro1'
}, {
text : 'Read Only 2',
flex : 2,
sortable : true,
dataIndex : 'ro2'
}, {
text : 'MV',
flex : 1,
sortable : true,
dataIndex : 'mv'
}, {
text : 'Editable 1',
flex : 1,
sortable : true,
dataIndex : 'e1',
editor : 'textfield'
}, {
text : 'Editable 2',
flex : 1,
sortable : true,
dataIndex : 'e2',
editor : 'textfield'
}
【问题讨论】:
-
捕获鼠标悬停事件并使用 .getEl().highlight() 方法。
标签: extjs