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

Export labels above Grid and Grid to Excel

2 Answers 82 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 13 Jun 2011, 10:15 PM
I have an aspx page that has some labels above a radgrid.  Is there a way I can export the page content to Excel including the labels and the radgrid vs. just exporting the grid to Excel?

2 Answers, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 14 Jun 2011, 12:36 PM
Hello Michael,

You can add your own custom bits of HTML code on the GridExporting event:
void RadGrid1_GridExporting(object sender, GridExportingArgs e)
{
    string customHtml = "test<br/>test2";
    e.ExportOutput = e.ExportOutput.Replace("<body>", "<body>" + customHtml);
}

Best regards,
Daniel
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Mike
Top achievements
Rank 1
answered on 14 Jun 2011, 02:36 PM
Thank you Daniel!
Tags
Grid
Asked by
Mike
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Mike
Top achievements
Rank 1
Share this question
or