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

Excel Format (Merge Cells)

2 Answers 19 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andy
Top achievements
Rank 1
Andy asked on 09 Jul 2014, 02:56 PM
Hi,I’m having an issue regarding exporting a grid control to Excel. (Via HTML) I have a grid which contains other hierarchal grids.  For example at the moment I can export and it looks like this:



The problem is col10 & col11, they follow the column widths of Col1 & Col2 – the end result being that the data is bunched up

What I’d like to get to is this:



To get this currently involves merging the each complete row in excel, unfortunately this is unrealistic in a live environment.
Is there anything I can do to resolve this?

TIA.
Andy.

2 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 14 Jul 2014, 10:29 AM
Hello Andy,

The behavior that you are observing is rather expected and is due to the fact that the number of columns in the nested grid differs from the number of columns in the parent grid. 

The only thing that I could suggest for your requirement is to add additional columns to the nested grid, so the number of columns in both grids is the same. The easiest way is to add empty template columns like shown bellow:
<Columns>
    <telerik:GridBoundColumn DataField="column1" HeaderText="column1"></telerik:GridBoundColumn>
    <telerik:GridBoundColumn DataField="column2" HeaderText="column2"></telerik:GridBoundColumn>
    <telerik:GridTemplateColumn></telerik:GridTemplateColumn>
    <telerik:GridTemplateColumn></telerik:GridTemplateColumn>
    <telerik:GridTemplateColumn></telerik:GridTemplateColumn>
</Columns>

Hope this helps.


Regards,
Konstantin Dikov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Andy
Top achievements
Rank 1
answered on 16 Jul 2014, 07:43 AM
Hi - Thanks for the suggestion.  It worked well.
Tags
Grid
Asked by
Andy
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Andy
Top achievements
Rank 1
Share this question
or