Copy from cell

Hi, I was wondering if there is a way to copy text data from cell to clipboard using ctrl-c, even if the row or cell is not in edit mode.

Thanks for your guide,

Juan J. 

1 Reply

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team June 28, 2018 12:41 PM UTC

Hi Juan, 

Thanks for contacting Syncfusion Support. 

Query #:-  if there is a way to copy text data from cell to clipboard using ctrl-c, even if the row or cell is not in edit mode. 

Solution #1:- using enableTouch as False 

We have analyzed your query and we suggest you to set the “enableTouch” property of Grid as false to select and copy the data. 

We have already discussed about select and copying the data in Grid in our Syncfusion Knowledge base. For your convenience please find the KB in following link. 

 
 
Solution #2:- Using CSS property class 
 
By default, user-select property will be set to none in the ejGrid. If you would like to disable this, you must override this property in the Grid. This can be achieved by using the CssClass property of the Grid.  
 
Please refer the below code snippet.  
 
allowSorting: true,                
            cssClass: "copyText",   
            columns: [  
                   .  
                   .  
                   .  
                   .  
  
<style>  
    .e-grid.copyText .e-rowcell {  
        -moz-user-select: inherit;  
        -khtml-user-select: inherit;  
        -webkit-user-select: text;  
        -ms-user-select: inherit;  
        user-select: inherit;  
    }  
</style>  
    
 
Regards, 

Farveen sulthana T 
 


Loader.
Up arrow icon