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

[Solved] how to center exported data

1 Answer 88 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jols
Top achievements
Rank 2
Jols asked on 20 May 2009, 04:50 AM
Once again hello to expert on telerik

              i would like to ask once again about exporting data from the grid, my  question is how am i going to center the data being exported to excel,csv,and pdf..

sample codes is highly appreciated

thanks to all

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 20 May 2009, 06:49 AM
Hello Jols,

You can center align the exported grid data while exporting to pdf using the following code:
c#:
 protected void Button_Click(object sender, EventArgs e) 
    {        
        RadGrid1.ExportSettings.IgnorePaging = true
        RadGrid1.ExportSettings.ExportOnlyData = true
        RadGrid1.ExportSettings.OpenInNewWindow = true
         
        RadGrid1.ExportSettings.Pdf.PageLeftMargin = Unit.Pixel(50); 
        RadGrid1.ExportSettings.Pdf.PageRightMargin = Unit.Pixel(50); 
        RadGrid1.MasterTableView.ExportToPdf(); 
    } 

Thanks
Princy.
Tags
Grid
Asked by
Jols
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Share this question
or