Export to Excel for grouped data in radgrid

2 posts, 0 answers
  1. t
    t avatar
    1 posts
    Member since:
    Feb 2016

    Posted 18 Feb Link to this post


    I have a radgrid which groups data according to Name. So, John will have all his data displayed and then greg and so on. But when I use to export to excel, it always exports the last group.

    Any ideas on this would be helpful. 

    I was also not able to find any demos for exporting grouped data.


    I have used the following export settings:

               string alternateText = "ExcelML";
                this.radGridBusinessGoalList.ExportSettings.Excel.Format =               (Telerik.Web.UI.GridExcelExportFormat)Enum.Parse(typeof(Telerik.Web.UI.GridExcelExportFormat), alternateText);
                this.radGridBusinessGoalList.ExportSettings.ExportOnlyData = true;
                this.radGridBusinessGoalList.ExportSettings.IgnorePaging = true;
                this.radGridBusinessGoalList.ExportSettings.OpenInNewWindow = true;




  2. Eyup
    Eyup avatar
    2942 posts

    Posted 23 Feb Link to this post


    Please make sure that you are not using DataBind() to bind the grid. Performing complex grid operations such as Inserting, Deleting, Updating, Hierarchy relations, Grouping, Exporting, Paging, Sorting, Filtering, etc. require accommodating appropriate database operations.  Therefore, we suggest you to avoid Simple Databinding and strongly recommend the use of more advanced databinding methods, which automatically handle the aforementioned functions:
    Declarative DataSource
    Programmatic Data Binding

    Also, you can temporarily remove the IgnorePaging and change the Format, because ExcelML has some specifics with Grouping:

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top