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

[Solved] Footer - Question

2 Answers 91 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Christian
Top achievements
Rank 1
Christian asked on 25 Aug 2009, 07:17 AM
I have a question regarding to RadExportFooter:

How can I override the Export-function of the RadExportFooter wirh my own export-function?

thanks

Christian

2 Answers, 1 is accepted

Sort by
0
Christian
Top achievements
Rank 1
answered on 25 Aug 2009, 08:27 AM
This questiion is obsolete ...
0
Princy
Top achievements
Rank 2
answered on 25 Aug 2009, 08:56 AM
Hi Christian,

You can use the following way to export the RadGrid contents if you don't want to use the built-in Export feature of RadGrid.

CS:
 
 protected void btnExport_Click(object sender, EventArgs e) 
    { 
        Response.Clear(); 
 
        Response.AddHeader("content-disposition""attachment; filename=FileName.xls"); 
 
        Response.Charset = ""
 
        Response.ContentType = "application/vnd.xls"
 
        System.IO.StringWriter stringWrite = new System.IO.StringWriter(); 
 
        System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite); 
 
        RadGrid1.AllowPaging = false
        RadGrid1.MasterTableView.Rebind(); 
 
        RadGrid1.RenderControl(htmlWrite); 
 
        Response.Write(stringWrite.ToString()); 
 
        Response.End(); 
 
    } 


Regards
Princy
Tags
Grid
Asked by
Christian
Top achievements
Rank 1
Answers by
Christian
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or