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

RadGrid to Excel in memory without exporting

1 Answer 81 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Coffee
Top achievements
Rank 1
Coffee asked on 15 Dec 2014, 04:26 PM
Dear folks,
                   I have a  radgrid that display monthly schedule for a ROTA application. This schedule is coming from a table in the database Sometimes, a schedule needs to be revised, which means making changes to certain days schedules in a month. Before any revision  i want to be able to take a snapshot of the radgrid as an excel file and save it into a filed of type varbinary in a table.
I want this snapshot process to occur in one go, all in memory where it would convert the datatable to excel format and then save to table as an excel file which could be later downloaded for vieweing. I want t avoid the step of exporting the file externally and saving on a location. 

pLS help, i will be extremely grateful

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 18 Dec 2014, 03:48 PM
Hello,

If you are using the normal, HTML-based export, you can use the OnGridExporting event. In it, you could access e.ExportOutput which is the full exported file content:
protected void RadGrid1_GridExporting(object sender, Telerik.Web.UI.GridExportingArgs e)
{
    string output = e.ExportOutput;
}

For additional information on the subject you can go through the forum thread below:
http://www.telerik.com/forums/619575-save-directly-to-file-by-export-to-excel-feature-of-radgrid

In case this is not what you are trying to achieve elaborate a bit more in the details.

Regards,
Pavlina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Coffee
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or