1
votes

I want to export current date along with radgrid data to the excel sheet. How can I do this?

For exporting radgrid I am using following code:

public void ExportExcel(RadGrid radGrid)
    {
        if (radGrid == null)
            throw new ArgumentNullException("radGrid");
        Page.IsExporting = true;

        //Export settings
        radGrid.ExportSettings.HideStructureColumns = true;
        radGrid.ExportSettings.SuppressColumnDataFormatStrings = false;
        radGrid.ExportSettings.ExportOnlyData = true;
        radGrid.ExportSettings.IgnorePaging = true;


        //Excel Format
        radGrid.ExportSettings.Excel.Format = GridExcelExportFormat.ExcelML;

        SetExportFileName(radGrid);

        radGrid.MasterTableView.ExportToExcel();
    }

First row of excel sheet should be- Date: Jan 30, 2014

then data of the radgrid should be displayed.

1

1 Answers

0
votes

Just write

radGrid.MasterTableView.Caption = "Title";