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

radGrid Excel Export Issue

2 Answers 40 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Justin
Top achievements
Rank 1
Justin asked on 20 Dec 2011, 05:16 PM
I'm having issues with two things, anyone know how to fix these?

My headers are links because they are sortable in the grid. How do you make it so they aren't links in Excel? Also when I add the image it overlaps the data exported, it there a way to push the data down?


Thanks! 

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 21 Dec 2011, 05:17 AM
Hello Justin,

Try the following code.
C#:
protected void RadGrid1_ExportCellFormatting(object sender, ExportCellFormattingEventArgs e)
{
 if (e.FormattedColumn.UniqueName == "UniqueName")
 {
   TableCell cell = item["UniqueName"];
   cell.Text = cell.Text;
 }
}

-Shinu.
0
Daniel
Telerik team
answered on 21 Dec 2011, 08:22 AM
Hi Justin,

Another option would be to set ExportOnlyData to true (in ExportSettings)

Regards,
Daniel
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Grid
Asked by
Justin
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Daniel
Telerik team
Share this question
or