This is a migrated thread and some comments may be shown as answers.

Copy to Excel in Row Templates

2 Answers 48 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sebastian
Top achievements
Rank 1
Sebastian asked on 08 May 2015, 07:39 AM

Hello,

my grid uses a row template and now I want to activate the copy to excel feature. So, I set allowCopy to true, but when I copy some selected cells to an excel sheet, the values are not displayed in the correct cells (see the attached excel file).

Is it actually possible to use this feature with row templates?

Regards

Sebastian

2 Answers, 1 is accepted

Sort by
0
Plamen Lazarov
Telerik team
answered on 11 May 2015, 02:49 PM

Hello Sebastian,

The allowCopy functionality is implemented to retrieve the text of the cells using jQuery's text() method under the hood. This method returns a string representation of the contents of the matched elements along with any new lines and white-spaces as part of it, which is actually the reason for the observed incorrect behavior. In order to avoid this, I would recommend to remove any unnecessary white spaces, which are not needed from the template, as demonstrated in the following simplified example.

Regards,
Plamen Lazarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Sebastian
Top achievements
Rank 1
answered on 12 May 2015, 11:15 AM

Hello,

now it works just perfectly. Thank you.

Regards

Sebastian

Tags
Grid
Asked by
Sebastian
Top achievements
Rank 1
Answers by
Plamen Lazarov
Telerik team
Sebastian
Top achievements
Rank 1
Share this question
or