Table selection and copying in ext3

Source: Internet
Author: User

There are many solutions on the Internet for selecting and copying tables in ext3, which are similar and can be basically solved.
However, I recently discovered that the solution provided on the Internet does not work in high-version chrome, So I studied it and came to the following conclusion (note the highlighted part in the style ).

(1) define a style

.x-selectable, .x-selectable * { user-select: text! important;-o-user-select: text! important;-moz-user-select: text! important;-khtml-user-select: text! important;-webkit-user-select: text! important;}

(2) apply a single table

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>'          )       }       },    ....})

(3) set the default table attributes

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>'    ); 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.