Export issue with merged column header in cloned RadGridView

4 posts, 1 answers
  1. Sherwin
    Sherwin avatar
    22 posts
    Member since:
    Jan 2011

    Posted 30 Nov 2012 Link to this post

    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
  2. Answer
    Yoan
    Admin
    Yoan avatar
    1215 posts

    Posted 05 Dec 2012 Link to this post

    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.

  3. Sherwin
    Sherwin avatar
    22 posts
    Member since:
    Jan 2011

    Posted 06 Dec 2012 Link to this post

    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 
       
  4. Yoan
    Admin
    Yoan avatar
    1215 posts

    Posted 06 Dec 2012 Link to this post

    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.

Back to Top