Extjs的grid表格的复制、粘贴
2014-01-08 17:26
393 查看
局部定义表格复制、粘贴的样式:
1.在jsp、html中的<head></head>中添加css样式:
2.在grid中添加:
全局定义复制、粘贴的样式:
1、在*.css文件中添加样式:
3、在每一个需要复制,粘贴的grid的中引入此js(注:必须在ext-all.js后引入)
1.在jsp、html中的<head></head>中添加css样式:
<style type="text/css"> .x-selectable, .x-selectable * { -moz-user-select: text!important; -khtml-user-select: text!important; } </style>
2.在grid中添加:
grid=new Ext.grid.GridPanel({ viewConfig: { 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>' ) } }, ....})
全局定义复制、粘贴的样式:
1、在*.css文件中添加样式:
.x-selectable, .x-selectable * { -moz-user-select: text!important; -khtml-user-select: text!important; }2、新建一个js文件,写入如下内容:
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>' );
3、在每一个需要复制,粘贴的grid的中引入此js(注:必须在ext-all.js后引入)
相关文章推荐
- Extjs的grid表格的复制、粘贴
- 实现Extjs的grid表格的复制、粘贴
- 火狐、IE浏览器实现Extjs的grid表格的复制、粘贴
- ExtJs的Ext.grid.GridPanel不能选择复制表格中的内容解决方案
- 使extjs的grid内容可复制粘贴
- 使extjs的grid内容可复制粘贴
- ExtJs的Ext.grid.GridPanel不能选择复制表格中的内容解决方案
- extjs表格(Ext4 Grid)文本启用选择复制功能
- extjs表格(Ext4 Grid)文本启用选择复制功能
- 【ExtJs】与后台数据库交互的带分页表格组件grid的查询
- [Sencha ExtJS & Touch] 表格(Ext.grid.Grid) 和 表格视图选项(Ext.grid.plugin.ViewOptions) 使用的时候要注意的问题
- Extjs学习总结之19表格组件gridpanel
- extjs表格grid功能详解
- ExtJS4.2 Grid知识点三:改变表格Grid单元格背景颜色
- ExtJs4–表格--Grid
- Extjs动态加载grid表格
- extjs表格文本启用选择复制功能具体实现
- [ExtJS5学习笔记]第三十三节 sencha extjs 5 grid表格导出excel
- [模板]为dgrid表格中的cell添加可编辑复制属性(自用)
- ExtJS4.2 Grid知识点四:改变表格Grid行文字颜色,划过Grid行时文字变粗