PDA

View Full Version : Copy grid cell value into clipboard in extjs4- Help needed



renganathan
28 Oct 2011, 9:55 PM
Hi all,

I want to copy the selected grid cell value into the clipboard . i don't have any clue to do that .


Guys please help me to implement this feature.


Thanks in advance

Renga

hundare
10 Sep 2012, 10:08 PM
Hi,

Did you find the solution? If yes can you please share the solution?

Thanks!

renganathan
11 Sep 2012, 2:50 AM
Please try extjs 4.1 + version

and add the below lines into the grid

viewConfig :
{
enableTextSelection: true

},




Hi,

Did you find the solution? If yes can you please share the solution?

Thanks!

hundare
11 Sep 2012, 7:25 PM
Iam using 4.0.
So I found a workaround for 4.0



columns: [

{header: 'Name', dataIndex: 'name', field: 'textfield'},
{header: 'Email', dataIndex: 'email', flex:1,
editor: {
xtype:'textfield', readOnly:true,
allowBlank:false
}
},
{header: 'Phone', dataIndex: 'phone'}
],
selType: 'rowmodel',
plugins: [
Ext.create('Ext.grid.plugin.RowEditing', {
clicksToEdit: 1
})
],

I have used the rowediting plugin and I have set the editor to 'textfield' of the column and used the readOnly config which will avoid any update on the grid data.
This works pretty well on all browsers.

Thanks for your help :)