step1:添加css样式。css代码<style type= "text/css" > .x-selectable, .x-selectable * { -moz-user-select: text! important ; -khtml-user-select: text! important ; } </style> step2:修改ext.grid.gridpanel 的prototype,我是自己写了一个新的js文件,记得要在ext-all.js后面引入。javascript代码if (!ext.grid.gridview.prototype.templates) { ext.grid.gridview.prototype.templates = {}; } ext.grid.gridview.prototype.templates.cell = new ext.template( '<td class="x-grid3-col x-grid3-cell x-grid3-td-{id} x-selectable {css}" style="{style}" tabindex="0" {cellattr}>' , '<div class="x-grid3-cell-inner x-grid3-col-{id}" {attr}>{value}</div>' , '</td>' );
Ext复制grid里某一列的值
最新推荐文章于 2018-06-13 00:20:16 发布
本文详细介绍了如何在Ext框架中通过CSS样式和自定义JS代码来实现元素的可选属性,包括添加CSS样式类和修改原型,旨在提高用户体验和页面美观。
3183

被折叠的 条评论
为什么被折叠?



