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

[Solved] RedGrid ExportToExcel

2 Answers 126 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sonia
Top achievements
Rank 1
Sonia asked on 13 May 2008, 08:50 AM
Hi,
I am filtering data based on some search criteria and getting the results in a RadGrid. I display the search criteria as a string above the RadGrid. By using ExportToExcel() I transfer the search results to an Excel file. But, I also want to include the search criteria/header in the Excel file. How to do that?

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 13 May 2008, 10:14 AM
Hi Sonia,

Try the following code snippet to export the Grid to Excel.

CS:
 RadGrid1.ExportSettings.ExportOnlyData = false
    RadGrid1.MasterTableView.ExportToExcel(); 


Shinu.
0
Sonia
Top achievements
Rank 1
answered on 14 May 2008, 04:40 AM
Hi Shinu,
Thanks for your reply.

What I want is, to append the search criteria, for eg., "Name=John; Location=India" on top of the Excel sheet along with the search results.
Is that possible?

Sonia
Tags
Grid
Asked by
Sonia
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Sonia
Top achievements
Rank 1
Share this question
or