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

Export issue with merged column header in cloned RadGridView

3 Answers 71 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sherwin
Top achievements
Rank 1
Sherwin asked on 30 Nov 2012, 10:18 PM
Hi,

I have a RadGridView with merge column headers displayed on a screen. There's a button to export the grid to html file and all is working fine if I use the instance of RadGridView currently displayed. I need to clone the current instance of the grid and use this cloned instance to export to html file. When I clone the grid, I created a new instance of the grid programatically and copied all the settings including the ColumnGroups & the ColumnGroupName of each column. The problem is that when I export the cloned grid, the merge column header are not being displayed in the export file. Is there any workaround for this issue?

Thanks,
Sherwin

3 Answers, 1 is accepted

Sort by
0
Accepted
Yoan
Telerik team
answered on 05 Dec 2012, 05:08 PM
Hello Sherwin,

I suppose the reason for this issue is that your merged headers are not loaded. Note that the RadGridView will export only the loaded elements. May I ask you why do you need to clone your grid?

Regards,
Yoan
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Sherwin
Top achievements
Rank 1
answered on 06 Dec 2012, 01:47 PM
Hello Yoan,

In my application, the RadGridView ItemSource is bound to DomainDatasource via WCF RIA Services with paging enabled. When exporting, I have an option to export the current page or all records. I need to clone the grid only when exporting all records. I do this so that it will not refresh the current state of the grid like the page no., etc. In short, I do this for better user experience. 

Anyway, is there a method I can call in RadGridView or a way to load the merged headers without displaying it in the UI?

Thanks,
-Sherwin 
   
0
Yoan
Telerik team
answered on 06 Dec 2012, 02:05 PM
Hi Sherwin,

It turns out that the merged headers rely on the already rendered GridView's Columns.

Greetings,
Yoan
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Sherwin
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Sherwin
Top achievements
Rank 1
Share this question
or