How to paste clipboard text into Grid - custom textarea in IE

Hi, I'm using IE to use Grid.
the Grid textarea doesn't work 'paste' from clipboard text.

I use edittemplate as following code.
col.Field(p => p.NextStepDetail).Width(500).EditTemplate(a => { a.Create("createML").Read("readML").Write("writeML"); }).ValidationRules(v => v.AddRule("required", true)).Add();


// Edit template functions for MultiLine textbox - Star Next Step detail
function createML() {
    return "<textarea class='form-control nextstepdetails' rows='1' cols='50' style='word-wrap:break-word !important;' onkeydown='CheckEnterKey()' onkeypress='CheckEnterKey()' onpaste='Paste()'>{{:NextStepDetail}}</textarea>";
}

function readML(args) {    
    return args.val();
}
function writeML(args) {
    args.element.css("width", "100%");
    args.element.css("word-wrap", "break-word");
}

onpaste event does not work. I tried other way. but didn't help.
could you show me a sample code to make it work? Please give me a response soon. Thank you.

1 Reply

VA Venkatesh Ayothi Raman Syncfusion Team November 10, 2017 11:46 AM UTC

Hi Dongil, 

Thanks for using Syncfusion products. 

We went through your code example that you have shared for us and found that you are define the “NextStepDetail” value using JSrender syntax as html string in create event. This is not recommended way and we suggest you to use Edit template write event to set the corresponding NextStepDetail value like as follows, 
function writeML(args) { 
        . . . 
        args.element.val(args.rowdata.NextStepDetail); 
    } 

Refer to the following online demo and Help documentation for more  information, 


We were unable to reproduced the reported issue “Grid textarea paste is not working in IE” at our end and we have prepared a sample for your convenience which can be download from following link, 


In this sample, we have rendered the Grid with edit template which is replicates your code example that you have shared for us. If you still face the same issue, then could you please provide following details? 
1)      Share replication procedure to reproduce the issue. 
2)      Essential studio version details 
3)      Share the issue video 
4)      A sample if possible or modified the given sample as issue reproducible, 


Regards, 
Venkatesh Ayothiraman. 


Loader.
Up arrow icon