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

[Solved] Export only filterd data

3 Answers 126 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Hari Govind
Top achievements
Rank 1
Hari Govind asked on 13 Aug 2009, 05:51 AM
Hi,
How to export only filterd data from Radgrid to excel/pdf.

Thanks
Rakesh G

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 13 Aug 2009, 06:25 AM
Hi Hari,

If you are using the built in filtering feature of the Grid you just need to click the Export button after performing the filtering operation. Here is the code that is needed to perform an Export operation in RadGrid.

CS:
 
protected void Button1_Click(object sender, EventArgs e) 
    { 
        RadGrid1.ExportSettings.ExportOnlyData = true
        RadGrid1.ExportSettings.OpenInNewWindow = true
        RadGrid1.MasterTableView.ExportToPdf(); 
         
    } 

Thanks
Shinu
0
Hari Govind
Top achievements
Rank 1
answered on 13 Aug 2009, 07:27 AM
Thanks,but the colum details are overlapped.How to apply styles to the exported data.
0
Pavlina
Telerik team
answered on 13 Aug 2009, 07:47 AM
Hello Hari,

How to apply styles to an exported RadGrid in Excel you can learn from the link bellow:
http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/exporting/defaultcs.aspx
(check out the ExcelML export)

However, it will be a lot easier to use the PDF export:
http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/pdfexport/defaultcs.aspx

All the best,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Hari Govind
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Hari Govind
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or