我在我的报告中使用了一个telerik Radgridview。我必须将结果导出到Excel中,因为我正在使用telerik的内置ExportToExcel函数,这将成功地将我的结果导出为excel格式。但我的要求是,我也要在生成的Excel中显示标题。
请指教
发布于 2013-08-28 10:27:51
我找到了解决办法。为此,我们需要添加以下事件:
protected void RadGrid1_ExcelMLExportRowCreated(object sender, Telerik.Web.UI.GridExcelBuilder.GridExportExcelMLRowCreatedArgs e)
{
if (e.RowType == Telerik.Web.UI.GridExcelBuilder.GridExportExcelMLRowType.HeaderRow)
{
e.Worksheet.WorksheetOptions.PageSetup.PageHeaderElement.Data = "This is the DRAFT Data";
}
}它会对我有用的。
https://stackoverflow.com/questions/18439774
复制相似问题