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

Issue while exporting Radgrid RowDetailsTemplate in export.ToHtml

1 Answer 77 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Inderpal
Top achievements
Rank 1
Inderpal asked on 03 Jul 2014, 01:16 PM
Hello Guys,

So i have one parent radgrid and i have one datatemplate which has one other child radgrid inside that template which i have assigned asRowDetailsTemplate of parent grid so every row of my parent radgrid will have one child radgrid.

So now I want to export the data of radgrid so with parent radgrid i want to export child radgrid data also. So i have seen many forums which says that it is possible in the below link http://www.telerik.com/forums/export-hierarchical-radgridview

But when i run that application and export then it exports my child radGrid data but it disturbs my parent radgrid data so after all child radgrid my parent radgrid full data comes in one cell so one full row data comes in one cell instead of getting the value in different cell.

I have attached the image for the same and have marked for the data coming differently.

I would really appreciate if someone could help me out with this.

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 03 Jul 2014, 03:03 PM
Hi,

The approach illustrated in the thread that you have mentioned is applicable only for CSV export, as the CSV format does not apply any restrictions other that using a valid separation token. On the other hand html implies that a specific document structure should be followed. RadGridView's html export generates an html table (<table>) that arranges cells and their content (<td>) in the respective rows (<tr>). If the mentioned approach is follwed, you will have something like this:
<table>
. . .
<tr><td>. . .</td></tr>
<table> . . . </table>
<tr><td>. . .</td></tr>
</table>
This is not a valid document structure, so that Excel fails to render it. You have to wrap the inner table into "<tr><td colspan="?">...</td></tr> to make it work properly.

Regards,
Ivan Ivanov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
GridView
Asked by
Inderpal
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Share this question
or